Reviewers: paul.l..., akos.palfi.imgtec, balazs.kilvady,
Description:
MIPS: Fix disassembler test for J and JAL instructions.
Adapted disassembler test for J and JAL instructions.
TEST=cctest/test-disasm-mips[64]
BUG=
Please review this at https://codereview.chromium.org/1258743004/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+8, -38 lines):
M test/cctest/test-disasm-mips.cc
M test/cctest/test-disasm-mips64.cc
Index: test/cctest/test-disasm-mips.cc
diff --git a/test/cctest/test-disasm-mips.cc
b/test/cctest/test-disasm-mips.cc
index
df728dc3a4ae3e694b97103ddb9f93eca036d14a..ee7830c14b83f8ad0cacb7ade1b95815d967a812
100644
--- a/test/cctest/test-disasm-mips.cc
+++ b/test/cctest/test-disasm-mips.cc
@@ -132,14 +132,6 @@ if (failure) { \
}
-#define GET_PC_REGION(pc_region) \
- { \
- int pc_offset = assm.pc_offset(); \
- byte *progcounter = &buffer[pc_offset]; \
- pc_region = reinterpret_cast<int32_t>(progcounter + 4) & ~0xfffffff; \
- }
-
-
TEST(Type0) {
SET_UP();
@@ -475,18 +467,11 @@ TEST(Type0) {
COMPARE_PC_REL_COMPACT(bgtz(a0, 32767), "1c807fff bgtz a0,
32767",
32767);
- int32_t pc_region;
- GET_PC_REGION(pc_region);
-
- int32_t target = pc_region | 0x4;
- COMPARE_PC_JUMP(j(target), "08000001 j ", target);
- target = pc_region | 0xffffffc;
- COMPARE_PC_JUMP(j(target), "0bffffff j ", target);
+ COMPARE_PC_JUMP(j(0x4), "08000001 j ", 0x4);
+ COMPARE_PC_JUMP(j(0xffffffc), "0bffffff j ", 0xffffffc);
- target = pc_region | 0x4;
- COMPARE_PC_JUMP(jal(target), "0c000001 jal ", target);
- target = pc_region | 0xffffffc;
- COMPARE_PC_JUMP(jal(target), "0fffffff jal ", target);
+ COMPARE_PC_JUMP(jal(0x4), "0c000001 jal ", 0x4);
+ COMPARE_PC_JUMP(jal(0xffffffc), "0fffffff jal ", 0xffffffc);
COMPARE(addiu(a0, a1, 0x0),
"24a40000 addiu a0, a1, 0");
Index: test/cctest/test-disasm-mips64.cc
diff --git a/test/cctest/test-disasm-mips64.cc
b/test/cctest/test-disasm-mips64.cc
index
43f24c1976403e1f42b1ac22c04f3a4ff48ceb9f..370b3cda2c90a67fe81bf4e79280d36d215980c5
100644
--- a/test/cctest/test-disasm-mips64.cc
+++ b/test/cctest/test-disasm-mips64.cc
@@ -132,14 +132,6 @@ if (failure) { \
}
-#define GET_PC_REGION(pc_region) \
- { \
- int pc_offset = assm.pc_offset(); \
- byte *progcounter = &buffer[pc_offset]; \
- pc_region = reinterpret_cast<int64_t>(progcounter + 4) & ~0xfffffff; \
- }
-
-
TEST(Type0) {
SET_UP();
@@ -1123,18 +1115,11 @@ TEST(Type3) {
COMPARE_PC_REL_COMPACT(bgtz(a0, 32767), "1c807fff bgtz a0,
32767",
32767);
- int64_t pc_region;
- GET_PC_REGION(pc_region);
-
- int64_t target = pc_region | 0x4;
- COMPARE_PC_JUMP(j(target), "08000001 j ", target);
- target = pc_region | 0xffffffc;
- COMPARE_PC_JUMP(j(target), "0bffffff j ", target);
+ COMPARE_PC_JUMP(j(0x4), "08000001 j ", 0x4);
+ COMPARE_PC_JUMP(j(0xffffffc), "0bffffff j ", 0xffffffc);
- target = pc_region | 0x4;
- COMPARE_PC_JUMP(jal(target), "0c000001 jal ", target);
- target = pc_region | 0xffffffc;
- COMPARE_PC_JUMP(jal(target), "0fffffff jal ", target);
+ COMPARE_PC_JUMP(jal(0x4), "0c000001 jal ", 0x4);
+ COMPARE_PC_JUMP(jal(0xffffffc), "0fffffff jal ", 0xffffffc);
VERIFY_RUN();
}
--
--
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.