Commit 657d979f authored by Junliang Yan's avatar Junliang Yan Committed by Commit Bot

PPC/s390: [ubsan] Let Runtime functions return a plain Address

Port f1cb51ad

Original Commit Message:

    instead of Object* (which is deprecated) or ObjectPtr (which is
    unsuitable for cases where we need to control the ABI exactly).
    Callers in generated code expect a plain tagged value, so return
    precisely that. Same for C++ Builtins.

R=jkummerow@chromium.org, joransiu@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: I8055c9a9c99dbe8716f810c6b6cc1967bed9c3de
Reviewed-on: https://chromium-review.googlesource.com/c/1393920Reviewed-by: 's avatarJoran Siu <joransiu@ca.ibm.com>
Commit-Queue: Junliang Yan <jyan@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#58531}
parent 9f68ab24
......@@ -948,23 +948,10 @@ bool Simulator::OverflowFrom(int32_t alu_out, int32_t left, int32_t right,
return overflow;
}
#if V8_TARGET_ARCH_PPC64
static void decodeObjectPair(ObjectPair* pair, intptr_t* x, intptr_t* y) {
*x = reinterpret_cast<intptr_t>(pair->x);
*y = reinterpret_cast<intptr_t>(pair->y);
}
#else
static void decodeObjectPair(ObjectPair* pair, intptr_t* x, intptr_t* y) {
#if V8_TARGET_BIG_ENDIAN
*x = static_cast<int32_t>(*pair >> 32);
*y = static_cast<int32_t>(*pair);
#else
*x = static_cast<int32_t>(*pair);
*y = static_cast<int32_t>(*pair >> 32);
#endif
*x = static_cast<intptr_t>(pair->x);
*y = static_cast<intptr_t>(pair->y);
}
#endif
// Calls into the V8 runtime.
typedef intptr_t (*SimulatorRuntimeCall)(intptr_t arg0, intptr_t arg1,
......
......@@ -1795,22 +1795,10 @@ bool Simulator::OverflowFromSigned(T1 alu_out, T1 left, T1 right,
return overflow;
}
#if V8_TARGET_ARCH_S390X
static void decodeObjectPair(ObjectPair* pair, intptr_t* x, intptr_t* y) {
*x = reinterpret_cast<intptr_t>(pair->x);
*y = reinterpret_cast<intptr_t>(pair->y);
*x = static_cast<intptr_t>(pair->x);
*y = static_cast<intptr_t>(pair->y);
}
#else
static void decodeObjectPair(ObjectPair* pair, intptr_t* x, intptr_t* y) {
#if V8_TARGET_BIG_ENDIAN
*x = static_cast<int32_t>(*pair >> 32);
*y = static_cast<int32_t>(*pair);
#else
*x = static_cast<int32_t>(*pair);
*y = static_cast<int32_t>(*pair >> 32);
#endif
}
#endif
// Calls into the V8 runtime.
typedef intptr_t (*SimulatorRuntimeCall)(intptr_t arg0, intptr_t arg1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment