Reviewers: jochen, Rodolph Perfetta (ARM),
Message:
Please take a look. In the long term we probably need more general solution
for
this type of problem.
I've been thinking about handling it in masm:
When we emit a branch instruction, check if the target label is bound. If
it is
bound, then we know the distance and can emit the correct branch
instruction.
Otherwise, emit the requested branch instruction + nop, so that later on we
could change it to a longer jump if the label is bound too far away.
Another approach is to add NEAR/FAR parameter to branch instructions like in
x64.
Description:
A64: Make branch to deferred code in StringCharFromCode longer.
TEST=mjsunit/md5
Please review this at https://codereview.chromium.org/141753020/
SVN Base: https://v8.googlecode.com/svn/branches/experimental/a64
Affected files (+4, -1 lines):
M src/a64/codegen-a64.cc
Index: src/a64/codegen-a64.cc
diff --git a/src/a64/codegen-a64.cc b/src/a64/codegen-a64.cc
index
924c271b3024fd8c197082cd53237a779f70bc66..27d2a431182721c013880b805d59e2eb0cae8b37
100644
--- a/src/a64/codegen-a64.cc
+++ b/src/a64/codegen-a64.cc
@@ -479,7 +479,10 @@ void StringCharLoadGenerator::Generate(MacroAssembler*
masm,
}
// Rule out short external strings.
STATIC_CHECK(kShortExternalStringTag != 0);
- __ TestAndBranchIfAnySet(result, kShortExternalStringMask, call_runtime);
+ // TestAndBranchIfAnySet can emit Tbnz. Do not use it because
call_runtime
+ // can be bound far away in deferred code.
+ __ Tst(result, kShortExternalStringMask);
+ __ B(ne, call_runtime);
__ Ldr(string, FieldMemOperand(string,
ExternalString::kResourceDataOffset));
Label ascii, done;
--
--
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/groups/opt_out.