| Index: runtime/vm/assembler_arm64_test.cc
|
| ===================================================================
|
| --- runtime/vm/assembler_arm64_test.cc (revision 36919)
|
| +++ runtime/vm/assembler_arm64_test.cc (working copy)
|
| @@ -23,8 +23,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Simple, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -37,8 +37,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Movz0, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -50,8 +50,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Movz1, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42LL << 16, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42LL << 16, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -62,8 +62,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Movz2, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42LL << 32, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42LL << 32, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -74,8 +74,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Movz3, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42LL << 48, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42LL << 48, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -87,8 +87,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Movn0, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(~42LL, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(~42LL, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -99,8 +99,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Movn1, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(~(42LL << 16), EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(~(42LL << 16), EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -111,8 +111,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Movn2, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(~(42LL << 32), EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(~(42LL << 32), EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -123,8 +123,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Movn3, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(~(42LL << 48), EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(~(42LL << 48), EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
| // movk
|
| @@ -136,9 +136,9 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Movk0, test) {
|
| - typedef int (*SimpleCode)();
|
| + typedef int64_t (*Int64Return)();
|
| EXPECT_EQ(
|
| - 42LL | (1LL << 48), EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + 42LL | (1LL << 48), EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -150,9 +150,9 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Movk1, test) {
|
| - typedef int (*SimpleCode)();
|
| + typedef int64_t (*Int64Return)();
|
| EXPECT_EQ(
|
| - (42LL << 16) | 1, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + (42LL << 16) | 1, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -164,9 +164,9 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Movk2, test) {
|
| - typedef int (*SimpleCode)();
|
| + typedef int64_t (*Int64Return)();
|
| EXPECT_EQ(
|
| - (42LL << 32) | 1, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + (42LL << 32) | 1, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -178,9 +178,9 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Movk3, test) {
|
| - typedef int (*SimpleCode)();
|
| + typedef int64_t (*Int64Return)();
|
| EXPECT_EQ(
|
| - (42LL << 48) | 1, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + (42LL << 48) | 1, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -191,8 +191,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(MovzBig, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(0x8000, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(0x8000, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -206,8 +206,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(AddReg, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -220,8 +220,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(AddLSLReg, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -234,8 +234,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(AddLSRReg, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -248,8 +248,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(AddASRReg, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -263,8 +263,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(AddASRNegReg, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -279,13 +279,14 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(AddExtReg, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| // Loads and Stores.
|
| ASSEMBLER_TEST_GENERATE(SimpleLoadStore, assembler) {
|
| + __ mov(SP, CSP);
|
| __ movz(R0, 43, 0);
|
| __ movz(R1, 42, 0);
|
| __ str(R1, Address(SP, -1*kWordSize, Address::PreIndex));
|
| @@ -295,12 +296,13 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(SimpleLoadStore, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| ASSEMBLER_TEST_GENERATE(SimpleLoadStoreHeapTag, assembler) {
|
| + __ mov(SP, CSP);
|
| __ movz(R0, 43, 0);
|
| __ movz(R1, 42, 0);
|
| __ add(R2, SP, Operand(1));
|
| @@ -311,12 +313,13 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(SimpleLoadStoreHeapTag, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| ASSEMBLER_TEST_GENERATE(LoadStoreLargeIndex, assembler) {
|
| + __ mov(SP, CSP);
|
| __ movz(R0, 43, 0);
|
| __ movz(R1, 42, 0);
|
| // Largest negative offset that can fit in the signed 9-bit immediate field.
|
| @@ -330,12 +333,13 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(LoadStoreLargeIndex, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| ASSEMBLER_TEST_GENERATE(LoadStoreLargeOffset, assembler) {
|
| + __ mov(SP, CSP);
|
| __ movz(R0, 43, 0);
|
| __ movz(R1, 42, 0);
|
| __ sub(SP, SP, Operand(512*kWordSize));
|
| @@ -347,12 +351,13 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(LoadStoreLargeOffset, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| ASSEMBLER_TEST_GENERATE(LoadStoreExtReg, assembler) {
|
| + __ mov(SP, CSP);
|
| __ movz(R0, 43, 0);
|
| __ movz(R1, 42, 0);
|
| __ movz(R2, 0xfff8, 0);
|
| @@ -368,12 +373,13 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(LoadStoreExtReg, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| ASSEMBLER_TEST_GENERATE(LoadStoreScaledReg, assembler) {
|
| + __ mov(SP, CSP);
|
| __ movz(R0, 43, 0);
|
| __ movz(R1, 42, 0);
|
| __ movz(R2, 10, 0);
|
| @@ -387,12 +393,13 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(LoadStoreScaledReg, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| ASSEMBLER_TEST_GENERATE(LoadSigned32Bit, assembler) {
|
| + __ mov(SP, CSP);
|
| __ LoadImmediate(R1, 0xffffffff, kNoPP);
|
| __ str(R1, Address(SP, -4, Address::PreIndex, kWord), kWord);
|
| __ ldr(R0, Address(SP), kWord);
|
| @@ -402,8 +409,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(LoadSigned32Bit, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(-1, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(-1, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -417,8 +424,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(AndRegs, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -431,8 +438,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(AndShiftRegs, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -445,8 +452,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(BicRegs, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -459,8 +466,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(OrrRegs, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -474,8 +481,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(OrnRegs, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -488,8 +495,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(EorRegs, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -502,8 +509,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(EonRegs, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -516,8 +523,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(AndImm, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -529,8 +536,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(AndOneImm, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(1, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(1, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -546,8 +553,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(OrrImm, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -562,8 +569,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(EorImm, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -579,8 +586,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(BranchALForward, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -602,8 +609,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(BranchALBackwards, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -623,8 +630,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(CmpEqBranch, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -644,8 +651,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(CmpEqBranchNotTaken, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -664,8 +671,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(CmpEq1Branch, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -684,8 +691,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(CmnEq1Branch, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -705,8 +712,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(CmpLtBranch, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -726,13 +733,11 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(CmpLtBranchNotTaken, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| -
|
| -
|
| ASSEMBLER_TEST_GENERATE(FcmpEqBranch, assembler) {
|
| Label l;
|
|
|
| @@ -749,8 +754,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(FcmpEqBranch, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -770,8 +775,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(FcmpEqBranchNotTaken, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -791,8 +796,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(FcmpLtBranch, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -812,8 +817,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(FcmpLtBranchNotTaken, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -834,8 +839,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(FcmpzGtBranch, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -855,8 +860,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(AndsBranch, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -876,8 +881,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(AndsBranchNotTaken, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -897,8 +902,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(BicsBranch, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -918,8 +923,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(BicsBranchNotTaken, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -938,8 +943,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(AndisBranch, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -958,8 +963,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(AndisBranchNotTaken, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -977,8 +982,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(AdrBr, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -997,8 +1002,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(AdrBlr, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1014,8 +1019,8 @@
|
|
|
| ASSEMBLER_TEST_RUN(Udiv, test) {
|
| EXPECT(test != NULL);
|
| - typedef int (*Tst)();
|
| - EXPECT_EQ(3, EXECUTE_TEST_CODE_INT64(Tst, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(3, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1031,8 +1036,8 @@
|
|
|
| ASSEMBLER_TEST_RUN(Sdiv, test) {
|
| EXPECT(test != NULL);
|
| - typedef int (*Tst)();
|
| - EXPECT_EQ(-3, EXECUTE_TEST_CODE_INT64(Tst, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(-3, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1047,8 +1052,8 @@
|
|
|
| ASSEMBLER_TEST_RUN(Udiv_zero, test) {
|
| EXPECT(test != NULL);
|
| - typedef int (*Tst)();
|
| - EXPECT_EQ(0, EXECUTE_TEST_CODE_INT64(Tst, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(0, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1063,8 +1068,8 @@
|
|
|
| ASSEMBLER_TEST_RUN(Sdiv_zero, test) {
|
| EXPECT(test != NULL);
|
| - typedef int (*Tst)();
|
| - EXPECT_EQ(0, EXECUTE_TEST_CODE_INT64(Tst, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(0, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1079,8 +1084,8 @@
|
|
|
| ASSEMBLER_TEST_RUN(Udiv_corner, test) {
|
| EXPECT(test != NULL);
|
| - typedef int (*Tst)();
|
| - EXPECT_EQ(0, EXECUTE_TEST_CODE_INT64(Tst, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(0, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1095,9 +1100,9 @@
|
|
|
| ASSEMBLER_TEST_RUN(Sdiv_corner, test) {
|
| EXPECT(test != NULL);
|
| - typedef int (*Tst)();
|
| + typedef int64_t (*Int64Return)();
|
| EXPECT_EQ(static_cast<int64_t>(0x8000000000000000),
|
| - EXECUTE_TEST_CODE_INT64(Tst, test->entry()));
|
| + EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1110,8 +1115,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Lslv, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1124,8 +1129,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Lsrv, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1139,8 +1144,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(LShiftingV, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(1, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(1, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1154,8 +1159,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(RShiftingV, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(-1, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(-1, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1168,8 +1173,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Mult_pos, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1183,8 +1188,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Mult_neg, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(-42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(-42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1197,8 +1202,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Smulh_pos, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(0, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(0, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1212,8 +1217,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Smulh_neg, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(-1, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(-1, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1225,8 +1230,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(LoadImmediateSmall, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1237,8 +1242,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(LoadImmediateMed, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(0xf1234123, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(0xf1234123, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1249,8 +1254,9 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(LoadImmediateMed2, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(0x4321f1234123, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(
|
| + 0x4321f1234123, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1261,9 +1267,9 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(LoadImmediateLarge, test) {
|
| - typedef int (*SimpleCode)();
|
| + typedef int64_t (*Int64Return)();
|
| EXPECT_EQ(static_cast<int64_t>(0x9287436598237465),
|
| - EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1274,8 +1280,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(LoadImmediateSmallNeg, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(-42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(-42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1286,8 +1292,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(LoadImmediateMedNeg, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(-0x1212341234, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(-0x1212341234, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1298,8 +1304,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(LoadImmediateMedNeg2, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(-0x1212340000, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(-0x1212340000, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1310,8 +1316,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(LoadImmediateMedNeg3, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(-0x1200001234, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(-0x1200001234, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1322,13 +1328,14 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(LoadImmediateMedNeg4, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(-0x12341234, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(-0x12341234, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| // Loading immediate values with the object pool.
|
| ASSEMBLER_TEST_GENERATE(LoadImmediatePPSmall, assembler) {
|
| + __ mov(SP, CSP);
|
| __ TagAndPushPP(); // Save caller's pool pointer and load a new one here.
|
| __ LoadPoolPointer(PP);
|
| __ LoadImmediate(R0, 42, PP);
|
| @@ -1338,12 +1345,13 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(LoadImmediatePPSmall, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| ASSEMBLER_TEST_GENERATE(LoadImmediatePPMed, assembler) {
|
| + __ mov(SP, CSP);
|
| __ TagAndPushPP(); // Save caller's pool pointer and load a new one here.
|
| __ LoadPoolPointer(PP);
|
| __ LoadImmediate(R0, 0xf1234123, PP);
|
| @@ -1353,12 +1361,13 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(LoadImmediatePPMed, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(0xf1234123, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(0xf1234123, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| ASSEMBLER_TEST_GENERATE(LoadImmediatePPMed2, assembler) {
|
| + __ mov(SP, CSP);
|
| __ TagAndPushPP(); // Save caller's pool pointer and load a new one here.
|
| __ LoadPoolPointer(PP);
|
| __ LoadImmediate(R0, 0x4321f1234124, PP);
|
| @@ -1368,12 +1377,14 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(LoadImmediatePPMed2, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(0x4321f1234124, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(
|
| + 0x4321f1234124, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| ASSEMBLER_TEST_GENERATE(LoadImmediatePPLarge, assembler) {
|
| + __ mov(SP, CSP);
|
| __ TagAndPushPP(); // Save caller's pool pointer and load a new one here.
|
| __ LoadPoolPointer(PP);
|
| __ LoadImmediate(R0, 0x9287436598237465, PP);
|
| @@ -1383,14 +1394,15 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(LoadImmediatePPLarge, test) {
|
| - typedef int (*SimpleCode)();
|
| + typedef int64_t (*Int64Return)();
|
| EXPECT_EQ(static_cast<int64_t>(0x9287436598237465),
|
| - EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| // LoadObject null.
|
| ASSEMBLER_TEST_GENERATE(LoadObjectNull, assembler) {
|
| + __ mov(SP, CSP);
|
| __ TagAndPushPP(); // Save caller's pool pointer and load a new one here.
|
| __ LoadPoolPointer(PP);
|
| __ LoadObject(R0, Object::null_object(), PP);
|
| @@ -1400,13 +1412,14 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(LoadObjectNull, test) {
|
| - typedef int (*SimpleCode)();
|
| + typedef int64_t (*Int64Return)();
|
| EXPECT_EQ(reinterpret_cast<int64_t>(Object::null()),
|
| - EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| ASSEMBLER_TEST_GENERATE(LoadObjectTrue, assembler) {
|
| + __ mov(SP, CSP);
|
| __ TagAndPushPP(); // Save caller's pool pointer and load a new one here.
|
| __ LoadPoolPointer(PP);
|
| __ LoadObject(R0, Bool::True(), PP);
|
| @@ -1416,13 +1429,14 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(LoadObjectTrue, test) {
|
| - typedef int (*SimpleCode)();
|
| + typedef int64_t (*Int64Return)();
|
| EXPECT_EQ(reinterpret_cast<int64_t>(Bool::True().raw()),
|
| - EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| ASSEMBLER_TEST_GENERATE(LoadObjectFalse, assembler) {
|
| + __ mov(SP, CSP);
|
| __ TagAndPushPP(); // Save caller's pool pointer and load a new one here.
|
| __ LoadPoolPointer(PP);
|
| __ LoadObject(R0, Bool::False(), PP);
|
| @@ -1432,9 +1446,9 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(LoadObjectFalse, test) {
|
| - typedef int (*SimpleCode)();
|
| + typedef int64_t (*Int64Return)();
|
| EXPECT_EQ(reinterpret_cast<int64_t>(Bool::False().raw()),
|
| - EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1448,8 +1462,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(CSelTrue, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1463,8 +1477,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(CSelFalse, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(1234, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(1234, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1478,8 +1492,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(CsincFalse, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(43, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(43, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1493,8 +1507,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(CsincTrue, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(1234, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(1234, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1508,8 +1522,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(CsinvFalse, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(~42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(~42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1523,8 +1537,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(CsinvTrue, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(1234, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(1234, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1536,8 +1550,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Fmovdi, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(1.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(1.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -1548,9 +1562,9 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Fmovdi2, test) {
|
| - typedef int (*SimpleCode)();
|
| + typedef double (*DoubleReturn)();
|
| EXPECT_FLOAT_EQ(123412983.1324524315,
|
| - EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()), 0.0001f);
|
| + EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()), 0.0001f);
|
| }
|
|
|
|
|
| @@ -1562,9 +1576,9 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Fmovrd, test) {
|
| - typedef int (*SimpleCode)();
|
| + typedef int64_t (*Int64Return)();
|
| const int64_t one = bit_cast<int64_t, double>(1.0);
|
| - EXPECT_EQ(one, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + EXPECT_EQ(one, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1577,12 +1591,13 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Fmovdr, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(1.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(1.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| ASSEMBLER_TEST_GENERATE(FldrdFstrdPrePostIndex, assembler) {
|
| + __ mov(SP, CSP);
|
| __ LoadDImmediate(V1, 42.0, kNoPP);
|
| __ fstrd(V1, Address(SP, -1*kWordSize, Address::PreIndex));
|
| __ fldrd(V0, Address(SP, 1*kWordSize, Address::PostIndex));
|
| @@ -1591,12 +1606,13 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(FldrdFstrdPrePostIndex, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| ASSEMBLER_TEST_GENERATE(FldrsFstrsPrePostIndex, assembler) {
|
| + __ mov(SP, CSP);
|
| __ LoadDImmediate(V1, 42.0, kNoPP);
|
| __ fcvtsd(V2, V1);
|
| __ fstrs(V2, Address(SP, -1*kWordSize, Address::PreIndex));
|
| @@ -1607,12 +1623,13 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(FldrsFstrsPrePostIndex, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| ASSEMBLER_TEST_GENERATE(FldrqFstrqPrePostIndex, assembler) {
|
| + __ mov(SP, CSP);
|
| __ LoadDImmediate(V1, 21.0, kNoPP);
|
| __ LoadDImmediate(V2, 21.0, kNoPP);
|
| __ LoadImmediate(R1, 42, kNoPP);
|
| @@ -1630,8 +1647,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(FldrqFstrqPrePostIndex, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -1643,8 +1660,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Fcvtzds, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1656,8 +1673,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Scvtfd, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -1669,8 +1686,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(FabsdPos, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -1682,8 +1699,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(FabsdNeg, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -1695,8 +1712,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(FnegdPos, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(-42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(-42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -1708,8 +1725,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(FnegdNeg, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -1721,8 +1738,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Fsqrtd, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(8.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(8.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -1735,8 +1752,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Fmuld, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -1749,8 +1766,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Fdivd, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -1763,8 +1780,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Faddd, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -1777,12 +1794,13 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Fsubd, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| ASSEMBLER_TEST_GENERATE(FldrdFstrdHeapTag, assembler) {
|
| + __ mov(SP, CSP);
|
| __ LoadDImmediate(V0, 43.0, kNoPP);
|
| __ LoadDImmediate(V1, 42.0, kNoPP);
|
| __ AddImmediate(SP, SP, -1 * kWordSize, kNoPP);
|
| @@ -1795,12 +1813,13 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(FldrdFstrdHeapTag, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| ASSEMBLER_TEST_GENERATE(FldrdFstrdLargeIndex, assembler) {
|
| + __ mov(SP, CSP);
|
| __ LoadDImmediate(V0, 43.0, kNoPP);
|
| __ LoadDImmediate(V1, 42.0, kNoPP);
|
| // Largest negative offset that can fit in the signed 9-bit immediate field.
|
| @@ -1814,12 +1833,13 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(FldrdFstrdLargeIndex, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| ASSEMBLER_TEST_GENERATE(FldrdFstrdLargeOffset, assembler) {
|
| + __ mov(SP, CSP);
|
| __ LoadDImmediate(V0, 43.0, kNoPP);
|
| __ LoadDImmediate(V1, 42.0, kNoPP);
|
| __ sub(SP, SP, Operand(512*kWordSize));
|
| @@ -1831,12 +1851,13 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(FldrdFstrdLargeOffset, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| ASSEMBLER_TEST_GENERATE(FldrdFstrdExtReg, assembler) {
|
| + __ mov(SP, CSP);
|
| __ LoadDImmediate(V0, 43.0, kNoPP);
|
| __ LoadDImmediate(V1, 42.0, kNoPP);
|
| __ movz(R2, 0xfff8, 0);
|
| @@ -1852,12 +1873,13 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(FldrdFstrdExtReg, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| ASSEMBLER_TEST_GENERATE(FldrdFstrdScaledReg, assembler) {
|
| + __ mov(SP, CSP);
|
| __ LoadDImmediate(V0, 43.0, kNoPP);
|
| __ LoadDImmediate(V1, 42.0, kNoPP);
|
| __ movz(R2, 10, 0);
|
| @@ -1871,8 +1893,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(FldrdFstrdScaledReg, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -1901,8 +1923,8 @@
|
|
|
| ASSEMBLER_TEST_RUN(VinswVmovrs, test) {
|
| EXPECT(test != NULL);
|
| - typedef int (*Tst)();
|
| - EXPECT_EQ(174, EXECUTE_TEST_CODE_INT64(Tst, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(174, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1923,8 +1945,8 @@
|
|
|
| ASSEMBLER_TEST_RUN(VinsxVmovrd, test) {
|
| EXPECT(test != NULL);
|
| - typedef int (*Tst)();
|
| - EXPECT_EQ(85, EXECUTE_TEST_CODE_INT64(Tst, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(85, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1951,8 +1973,8 @@
|
|
|
| ASSEMBLER_TEST_RUN(Vnot, test) {
|
| EXPECT(test != NULL);
|
| - typedef int (*Tst)();
|
| - EXPECT_EQ(2, EXECUTE_TEST_CODE_INT64(Tst, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(2, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -1981,8 +2003,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vabss, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -2004,8 +2026,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vabsd, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -2033,8 +2055,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vnegs, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -2056,8 +2078,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vnegd, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -2097,8 +2119,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vadds, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(12.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(12.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -2139,8 +2161,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vsubs, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(-6.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(-6.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -2180,8 +2202,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vmuls, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(14.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(14.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -2221,8 +2243,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vdivs, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(4.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(4.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -2244,8 +2266,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vaddd, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(10.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(10.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -2268,8 +2290,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vsubd, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(-5.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(-5.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -2291,8 +2313,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vmuld, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(13.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(13.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -2314,12 +2336,13 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vdivd, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(2.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(2.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| ASSEMBLER_TEST_GENERATE(Vdupd, assembler) {
|
| + __ mov(SP, CSP);
|
| __ LoadDImmediate(V0, 21.0, kNoPP);
|
| __ vdupd(V1, V0, 0);
|
|
|
| @@ -2336,17 +2359,17 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vdupd, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| ASSEMBLER_TEST_GENERATE(Vdups, assembler) {
|
| + __ mov(SP, CSP);
|
| __ LoadDImmediate(V0, 21.0, kNoPP);
|
| __ fcvtsd(V0, V0);
|
| __ vdups(V1, V0, 0);
|
|
|
| -
|
| const int sword_bytes = 1 << Log2OperandSizeBytes(kSWord);
|
| const int qword_bytes = 1 << Log2OperandSizeBytes(kQWord);
|
| __ fstrq(V1, Address(SP, -1 * qword_bytes, Address::PreIndex));
|
| @@ -2369,12 +2392,13 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vdups, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(84.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(84.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| ASSEMBLER_TEST_GENERATE(Vinsd, assembler) {
|
| + __ mov(SP, CSP);
|
| __ LoadDImmediate(V5, 42.0, kNoPP);
|
| __ vinsd(V1, 1, V5, 0); // V1[1] <- V0[0].
|
|
|
| @@ -2391,12 +2415,13 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vinsd, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| ASSEMBLER_TEST_GENERATE(Vinss, assembler) {
|
| + __ mov(SP, CSP);
|
| __ LoadDImmediate(V0, 21.0, kNoPP);
|
| __ fcvtsd(V0, V0);
|
| __ vinss(V1, 3, V0, 0);
|
| @@ -2424,8 +2449,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vinss, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -2461,8 +2486,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vand, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -2499,8 +2524,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vorr, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -2533,8 +2558,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Veor, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -2558,8 +2583,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vaddw, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(168, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(168, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -2584,8 +2609,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vsubw, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(84, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(84, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -2605,8 +2630,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vaddx, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(84, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(84, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -2627,8 +2652,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vsubx, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(42, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -2660,8 +2685,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vceqs, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(0xfffffffe, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(0xfffffffe, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -2684,8 +2709,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vceqd, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(-1, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(-1, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -2717,8 +2742,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vcgts, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(0xfffffffe, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(0xfffffffe, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -2741,8 +2766,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vcgtd, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(-1, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(-1, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -2774,8 +2799,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vcges, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(0xfffffffe, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(0xfffffffe, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -2798,8 +2823,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vcged, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(-1, EXECUTE_TEST_CODE_INT64(SimpleCode, test->entry()));
|
| + typedef int64_t (*Int64Return)();
|
| + EXPECT_EQ(-1, EXECUTE_TEST_CODE_INT64(Int64Return, test->entry()));
|
| }
|
|
|
|
|
| @@ -2836,8 +2861,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vmaxs, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -2860,8 +2885,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vmaxd, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -2898,8 +2923,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vmins, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -2922,8 +2947,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vmind, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(42.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -2952,8 +2977,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vsqrts, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(15.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(15.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -2975,8 +3000,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(Vsqrtd, test) {
|
| - typedef int (*SimpleCode)();
|
| - EXPECT_EQ(15.0, EXECUTE_TEST_CODE_DOUBLE(SimpleCode, test->entry()));
|
| + typedef double (*DoubleReturn)();
|
| + EXPECT_EQ(15.0, EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry()));
|
| }
|
|
|
|
|
| @@ -3030,8 +3055,8 @@
|
|
|
| ASSEMBLER_TEST_RUN(Vrecpes, test) {
|
| EXPECT(test != NULL);
|
| - typedef double (*Vrecpes)();
|
| - float res = EXECUTE_TEST_CODE_DOUBLE(Vrecpes, test->entry());
|
| + typedef double (*DoubleReturn)();
|
| + float res = EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry());
|
| EXPECT_FLOAT_EQ(arm_recip_estimate(147.0), res, 0.0001);
|
| }
|
|
|
| @@ -3052,8 +3077,8 @@
|
|
|
| ASSEMBLER_TEST_RUN(Vrecpss, test) {
|
| EXPECT(test != NULL);
|
| - typedef double (*Vrecpss)();
|
| - double res = EXECUTE_TEST_CODE_DOUBLE(Vrecpss, test->entry());
|
| + typedef double (*DoubleReturn)();
|
| + double res = EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry());
|
| EXPECT_FLOAT_EQ(2.0 - 10.0 * 5.0, res, 0.0001);
|
| }
|
|
|
| @@ -3084,8 +3109,8 @@
|
|
|
|
|
| ASSEMBLER_TEST_RUN(VRecps, test) {
|
| - typedef double (*VRecps)();
|
| - double res = EXECUTE_TEST_CODE_DOUBLE(VRecps, test->entry());
|
| + typedef double (*DoubleReturn)();
|
| + double res = EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry());
|
| EXPECT_FLOAT_EQ(42.0, res, 0.0001);
|
| }
|
|
|
| @@ -3154,8 +3179,8 @@
|
|
|
| ASSEMBLER_TEST_RUN(Vrsqrtes, test) {
|
| EXPECT(test != NULL);
|
| - typedef double (*Vrsqrtes)();
|
| - double res = EXECUTE_TEST_CODE_DOUBLE(Vrsqrtes, test->entry());
|
| + typedef double (*DoubleReturn)();
|
| + double res = EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry());
|
| EXPECT_FLOAT_EQ(arm_reciprocal_sqrt_estimate(147.0), res, 0.0001);
|
| }
|
|
|
| @@ -3176,8 +3201,8 @@
|
|
|
| ASSEMBLER_TEST_RUN(Vrsqrtss, test) {
|
| EXPECT(test != NULL);
|
| - typedef double (*Vrsqrtss)();
|
| - double res = EXECUTE_TEST_CODE_DOUBLE(Vrsqrtss, test->entry());
|
| + typedef double (*DoubleReturn)();
|
| + double res = EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry());
|
| EXPECT_FLOAT_EQ((3.0 - 10.0 * 5.0)/2.0, res, 0.0001);
|
| }
|
|
|
| @@ -3195,8 +3220,8 @@
|
|
|
| ASSEMBLER_TEST_RUN(ReciprocalSqrt, test) {
|
| EXPECT(test != NULL);
|
| - typedef double (*ReciprocalSqrt)();
|
| - double res = EXECUTE_TEST_CODE_DOUBLE(ReciprocalSqrt, test->entry());
|
| + typedef double (*DoubleReturn)();
|
| + double res = EXECUTE_TEST_CODE_DOUBLE(DoubleReturn, test->entry());
|
| EXPECT_FLOAT_EQ(1.0/sqrt(147000.0), res, 0.0001);
|
| }
|
|
|
| @@ -3207,6 +3232,7 @@
|
| // R1: value.
|
| // R2: growable array.
|
| ASSEMBLER_TEST_GENERATE(StoreIntoObject, assembler) {
|
| + __ mov(SP, CSP);
|
| __ TagAndPushPP();
|
| __ LoadPoolPointer(PP);
|
| __ Push(CTX);
|
|
|