Revision: 12682
Author: [email protected]
Date: Tue Oct 9 08:12:39 2012
Log: Improve page flag checking sequence on ARM.
[email protected]
Review URL: https://codereview.chromium.org/11090021
http://code.google.com/p/v8/source/detail?r=12682
Modified:
/branches/bleeding_edge/src/arm/macro-assembler-arm.cc
/branches/bleeding_edge/src/arm/macro-assembler-arm.h
=======================================
--- /branches/bleeding_edge/src/arm/macro-assembler-arm.cc Mon Oct 8
05:50:15 2012
+++ /branches/bleeding_edge/src/arm/macro-assembler-arm.cc Tue Oct 9
08:12:39 2012
@@ -363,12 +363,14 @@
}
-void MacroAssembler::Bfc(Register dst, int lsb, int width, Condition cond)
{
+void MacroAssembler::Bfc(Register dst, Register src, int lsb, int width,
+ Condition cond) {
ASSERT(lsb < 32);
if (!CpuFeatures::IsSupported(ARMv7) || predictable_code_size()) {
int mask = (1 << (width + lsb)) - 1 - ((1 << lsb) - 1);
- bic(dst, dst, Operand(mask));
+ bic(dst, src, Operand(mask));
} else {
+ Move(dst, src, cond);
bfc(dst, lsb, width, cond);
}
}
@@ -3497,7 +3499,7 @@
int mask,
Condition cc,
Label* condition_met) {
- and_(scratch, object, Operand(~Page::kPageAlignmentMask));
+ Bfc(scratch, object, 0, kPageSizeBits);
ldr(scratch, MemOperand(scratch, MemoryChunk::kFlagsOffset));
tst(scratch, Operand(mask));
b(cc, condition_met);
=======================================
--- /branches/bleeding_edge/src/arm/macro-assembler-arm.h Mon Oct 8
05:50:15 2012
+++ /branches/bleeding_edge/src/arm/macro-assembler-arm.h Tue Oct 9
08:12:39 2012
@@ -154,7 +154,7 @@
int lsb,
int width,
Condition cond = al);
- void Bfc(Register dst, int lsb, int width, Condition cond = al);
+ void Bfc(Register dst, Register src, int lsb, int width, Condition cond
= al);
void Usat(Register dst, int satpos, const Operand& src,
Condition cond = al);
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev