Chromium Code Reviews| Index: runtime/vm/assembler_x64_test.cc |
| =================================================================== |
| --- runtime/vm/assembler_x64_test.cc (revision 7962) |
| +++ runtime/vm/assembler_x64_test.cc (working copy) |
| @@ -1211,6 +1211,26 @@ |
| EXPECT_EQ(16, res); // 16 bytes emitted. |
| } |
| + |
| +ASSEMBLER_TEST_GENERATE(TestAdds, assembler) { |
| + __ movq(RAX, Immediate(4)); |
| + __ pushq(RAX); |
| + __ addq(Address(RSP, 0), Immediate(5)); |
| + // TOS: 9 |
| + __ addq(Address(RSP, 0), Immediate(-2)); |
|
regis
2012/05/24 23:31:29
You are not testing the newly added (Address, Regi
srdjan
2012/05/24 23:54:13
Added test.
|
| + // TOS: 7 |
| + __ popq(RAX); |
| + __ ret(); |
| +} |
| + |
| + |
| +ASSEMBLER_TEST_RUN(TestAdds, entry) { |
| + typedef int (*TestAdds)(); |
| + int res = reinterpret_cast<TestAdds>(entry)(); |
| + EXPECT_EQ(7, res); |
| +} |
| + |
| + |
| } // namespace dart |
| #endif // defined TARGET_ARCH_X64 |