Status: Untriaged
Owner: ----
New issue 4277 by [email protected]: Problem with
MOVW_MOVT_IMMEDIATE_LOADS feature
https://code.google.com/p/v8/issues/detail?id=4277
I found a bug in the v8 code when the MOVW_MOVT_IMMEDIATE_LOADS is
supported.
See the below code. It is DoStackCheck function in the
lithium-codegen-arm.cc file.
PredictableCodeSizeScope predictable(masm(),
CallCodeSize(stack_check, RelocInfo::CODE_TARGET)); // 1) size
expectation time
DCHECK(instr->context()->IsRegister());
DCHECK(ToRegister(instr->context()).is(cp));
CallCode(stack_check, RelocInfo::CODE_TARGET, instr); // 2) code
generation time
The problem is that value of the predictable_code_size_ variable is
different in size expectation time(1) and code generation time(2). It is
because CallCodeSize function is called earlier than
PredictableCodeSizeScope construtor. The predictable_code_size_ variable is
set to true in the PredictableCodeSizeScope construtor. So in the
destructor of the PredictableCodeSizeScope, the ASSERT error occurs.
Therefore, is it needed a function that sets the predictable_code_size_
variable separated from the PredictableCodeSizeScope construtor?
For reference, please look at the following code. It is called from both
the CallCodeSize function and CallCode function.
static bool use_mov_immediate_load(const Operand& x,
const Assembler* assembler) {
...
} else if (CpuFeatures::IsSupported(MOVW_MOVT_IMMEDIATE_LOADS) &&
(assembler == NULL |
| !assembler->predictable_code_size())) {
// Prefer movw / movt to constant pool if it is more efficient on
the CPU.
return true;
...
}
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.