Reviewers: ulan, jochen,
Description:
ARM64: Remove the unused 'SmiAbs'.
BUG=
Please review this at https://codereview.chromium.org/572903003/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+0, -63 lines):
M src/arm64/macro-assembler-arm64.h
M src/arm64/macro-assembler-arm64.cc
M test/cctest/test-assembler-arm64.cc
Index: src/arm64/macro-assembler-arm64.cc
diff --git a/src/arm64/macro-assembler-arm64.cc
b/src/arm64/macro-assembler-arm64.cc
index
60f417daa2f6069018f77b6c002f96c09fbfe3ba..f78efd289c6f7806635c08153ab2c9dd80a62819
100644
--- a/src/arm64/macro-assembler-arm64.cc
+++ b/src/arm64/macro-assembler-arm64.cc
@@ -1658,12 +1658,6 @@ void MacroAssembler::ThrowUncatchable(Register value,
}
-void MacroAssembler::SmiAbs(const Register& smi, Label* slow) {
- DCHECK(smi.Is64Bits());
- Abs(smi, smi, slow);
-}
-
-
void MacroAssembler::AssertSmi(Register object, BailoutReason reason) {
if (emit_debug_code()) {
STATIC_ASSERT(kSmiTag == 0);
Index: src/arm64/macro-assembler-arm64.h
diff --git a/src/arm64/macro-assembler-arm64.h
b/src/arm64/macro-assembler-arm64.h
index
8d5f4fc05b4267beeb0be400914979fce320c9fc..e73fc2cec5a8baa81ed713fe0ce40710dde74639
100644
--- a/src/arm64/macro-assembler-arm64.h
+++ b/src/arm64/macro-assembler-arm64.h
@@ -910,11 +910,6 @@ class MacroAssembler : public Assembler {
inline void SmiTagAndPush(Register src);
inline void SmiTagAndPush(Register src1, Register src2);
- // Compute the absolute value of 'smi' and leave the result in 'smi'
- // register. If 'smi' is the most negative SMI, the absolute value cannot
- // be represented as a SMI and a jump to 'slow' is done.
- void SmiAbs(const Register& smi, Label* slow);
-
inline void JumpIfSmi(Register value,
Label* smi_label,
Label* not_smi_label = NULL);
Index: test/cctest/test-assembler-arm64.cc
diff --git a/test/cctest/test-assembler-arm64.cc
b/test/cctest/test-assembler-arm64.cc
index
3d05487f393e9acfda72bf305051c8f07b408317..587a4ce971be319a430d006e2013cf38e776890d
100644
--- a/test/cctest/test-assembler-arm64.cc
+++ b/test/cctest/test-assembler-arm64.cc
@@ -10270,58 +10270,6 @@ TEST(copyfields) {
}
-static void DoSmiAbsTest(int32_t value, bool must_fail = false) {
- SETUP();
-
- START();
- Label end, slow;
- __ Mov(x2, 0xc001c0de);
- __ Mov(x1, value);
- __ SmiTag(x1);
- __ SmiAbs(x1, &slow);
- __ SmiUntag(x1);
- __ B(&end);
-
- __ Bind(&slow);
- __ Mov(x2, 0xbad);
-
- __ Bind(&end);
- END();
-
- RUN();
-
- if (must_fail) {
- // We tested an invalid conversion. The code must have jump on slow.
- CHECK_EQUAL_64(0xbad, x2);
- } else {
- // The conversion is valid, check the result.
- int32_t result = (value >= 0) ? value : -value;
- CHECK_EQUAL_64(result, x1);
-
- // Check that we didn't jump on slow.
- CHECK_EQUAL_64(0xc001c0de, x2);
- }
-
- TEARDOWN();
-}
-
-
-TEST(smi_abs) {
- INIT_V8();
- // Simple and edge cases.
- DoSmiAbsTest(0);
- DoSmiAbsTest(0x12345);
- DoSmiAbsTest(0x40000000);
- DoSmiAbsTest(0x7fffffff);
- DoSmiAbsTest(-1);
- DoSmiAbsTest(-12345);
- DoSmiAbsTest(0x80000001);
-
- // Check that the most negative SMI is detected.
- DoSmiAbsTest(0x80000000, true);
-}
-
-
TEST(blr_lr) {
// A simple test to check that the simulator correcty handle "blr lr".
INIT_V8();
--
--
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.