Index: test/cctest/test-assembler-ppc.cc |
diff --git a/test/cctest/test-assembler-ppc.cc b/test/cctest/test-assembler-ppc.cc |
index 4a2e7d398306499f4585de8f1883bfe0ccd0db87..b2dca6a9fc6c24252c2c109fe58e1f2ed298072c 100644 |
--- a/test/cctest/test-assembler-ppc.cc |
+++ b/test/cctest/test-assembler-ppc.cc |
@@ -194,21 +194,21 @@ TEST(3) { |
__ mr(r4, r3); |
// modify field int i of struct |
- __ lwz(r3, MemOperand(r4, OFFSET_OF(T, i))); |
+ __ lwz(r3, MemOperand(r4, offsetof(T, i))); |
__ srwi(r5, r3, Operand(1)); |
- __ stw(r5, MemOperand(r4, OFFSET_OF(T, i))); |
+ __ stw(r5, MemOperand(r4, offsetof(T, i))); |
// modify field char c of struct |
- __ lbz(r5, MemOperand(r4, OFFSET_OF(T, c))); |
+ __ lbz(r5, MemOperand(r4, offsetof(T, c))); |
__ add(r3, r5, r3); |
__ slwi(r5, r5, Operand(2)); |
- __ stb(r5, MemOperand(r4, OFFSET_OF(T, c))); |
+ __ stb(r5, MemOperand(r4, offsetof(T, c))); |
// modify field int16_t s of struct |
- __ lhz(r5, MemOperand(r4, OFFSET_OF(T, s))); |
+ __ lhz(r5, MemOperand(r4, offsetof(T, s))); |
__ add(r3, r5, r3); |
__ srwi(r5, r5, Operand(3)); |
- __ sth(r5, MemOperand(r4, OFFSET_OF(T, s))); |
+ __ sth(r5, MemOperand(r4, offsetof(T, s))); |
// restore frame |
#if V8_TARGET_ARCH_PPC64 |
@@ -278,59 +278,59 @@ TEST(4) { |
__ sub(fp, ip, Operand(4)); |
__ mov(r4, Operand(r0)); |
- __ vldr(d6, r4, OFFSET_OF(T, a)); |
- __ vldr(d7, r4, OFFSET_OF(T, b)); |
+ __ vldr(d6, r4, offsetof(T, a)); |
+ __ vldr(d7, r4, offsetof(T, b)); |
__ vadd(d5, d6, d7); |
- __ vstr(d5, r4, OFFSET_OF(T, c)); |
+ __ vstr(d5, r4, offsetof(T, c)); |
__ vmov(r2, r3, d5); |
__ vmov(d4, r2, r3); |
- __ vstr(d4, r4, OFFSET_OF(T, b)); |
+ __ vstr(d4, r4, offsetof(T, b)); |
// Load t.x and t.y, switch values, and store back to the struct. |
- __ vldr(s0, r4, OFFSET_OF(T, x)); |
- __ vldr(s31, r4, OFFSET_OF(T, y)); |
+ __ vldr(s0, r4, offsetof(T, x)); |
+ __ vldr(s31, r4, offsetof(T, y)); |
__ vmov(s16, s0); |
__ vmov(s0, s31); |
__ vmov(s31, s16); |
- __ vstr(s0, r4, OFFSET_OF(T, x)); |
- __ vstr(s31, r4, OFFSET_OF(T, y)); |
+ __ vstr(s0, r4, offsetof(T, x)); |
+ __ vstr(s31, r4, offsetof(T, y)); |
// Move a literal into a register that can be encoded in the instruction. |
__ vmov(d4, 1.0); |
- __ vstr(d4, r4, OFFSET_OF(T, e)); |
+ __ vstr(d4, r4, offsetof(T, e)); |
// Move a literal into a register that requires 64 bits to encode. |
// 0x3ff0000010000000 = 1.000000059604644775390625 |
__ vmov(d4, 1.000000059604644775390625); |
- __ vstr(d4, r4, OFFSET_OF(T, d)); |
+ __ vstr(d4, r4, offsetof(T, d)); |
// Convert from floating point to integer. |
__ vmov(d4, 2.0); |
__ vcvt_s32_f64(s31, d4); |
- __ vstr(s31, r4, OFFSET_OF(T, i)); |
+ __ vstr(s31, r4, offsetof(T, i)); |
// Convert from integer to floating point. |
__ mov(lr, Operand(42)); |
__ vmov(s31, lr); |
__ vcvt_f64_s32(d4, s31); |
- __ vstr(d4, r4, OFFSET_OF(T, f)); |
+ __ vstr(d4, r4, offsetof(T, f)); |
// Test vabs. |
- __ vldr(d1, r4, OFFSET_OF(T, g)); |
+ __ vldr(d1, r4, offsetof(T, g)); |
__ vabs(d0, d1); |
- __ vstr(d0, r4, OFFSET_OF(T, g)); |
- __ vldr(d2, r4, OFFSET_OF(T, h)); |
+ __ vstr(d0, r4, offsetof(T, g)); |
+ __ vldr(d2, r4, offsetof(T, h)); |
__ vabs(d0, d2); |
- __ vstr(d0, r4, OFFSET_OF(T, h)); |
+ __ vstr(d0, r4, offsetof(T, h)); |
// Test vneg. |
- __ vldr(d1, r4, OFFSET_OF(T, m)); |
+ __ vldr(d1, r4, offsetof(T, m)); |
__ vneg(d0, d1); |
- __ vstr(d0, r4, OFFSET_OF(T, m)); |
- __ vldr(d1, r4, OFFSET_OF(T, n)); |
+ __ vstr(d0, r4, offsetof(T, m)); |
+ __ vldr(d1, r4, offsetof(T, n)); |
__ vneg(d0, d1); |
- __ vstr(d0, r4, OFFSET_OF(T, n)); |
+ __ vstr(d0, r4, offsetof(T, n)); |
__ ldm(ia_w, sp, r4.bit() | fp.bit() | pc.bit()); |
@@ -677,19 +677,19 @@ TEST(8) { |
__ stm(db_w, sp, r4.bit() | fp.bit() | lr.bit()); |
__ sub(fp, ip, Operand(4)); |
- __ addi(r4, r0, Operand(OFFSET_OF(D, a))); |
+ __ addi(r4, r0, Operand(offsetof(D, a))); |
__ vldm(ia_w, r4, d0, d3); |
__ vldm(ia_w, r4, d4, d7); |
- __ addi(r4, r0, Operand(OFFSET_OF(D, a))); |
+ __ addi(r4, r0, Operand(offsetof(D, a))); |
__ vstm(ia_w, r4, d6, d7); |
__ vstm(ia_w, r4, d0, d5); |
- __ addi(r4, r1, Operand(OFFSET_OF(F, a))); |
+ __ addi(r4, r1, Operand(offsetof(F, a))); |
__ vldm(ia_w, r4, s0, s3); |
__ vldm(ia_w, r4, s4, s7); |
- __ addi(r4, r1, Operand(OFFSET_OF(F, a))); |
+ __ addi(r4, r1, Operand(offsetof(F, a))); |
__ vstm(ia_w, r4, s6, s7); |
__ vstm(ia_w, r4, s0, s5); |
@@ -789,22 +789,22 @@ TEST(9) { |
__ stm(db_w, sp, r4.bit() | fp.bit() | lr.bit()); |
__ sub(fp, ip, Operand(4)); |
- __ addi(r4, r0, Operand(OFFSET_OF(D, a))); |
+ __ addi(r4, r0, Operand(offsetof(D, a))); |
__ vldm(ia, r4, d0, d3); |
__ addi(r4, r4, Operand(4 * 8)); |
__ vldm(ia, r4, d4, d7); |
- __ addi(r4, r0, Operand(OFFSET_OF(D, a))); |
+ __ addi(r4, r0, Operand(offsetof(D, a))); |
__ vstm(ia, r4, d6, d7); |
__ addi(r4, r4, Operand(2 * 8)); |
__ vstm(ia, r4, d0, d5); |
- __ addi(r4, r1, Operand(OFFSET_OF(F, a))); |
+ __ addi(r4, r1, Operand(offsetof(F, a))); |
__ vldm(ia, r4, s0, s3); |
__ addi(r4, r4, Operand(4 * 4)); |
__ vldm(ia, r4, s4, s7); |
- __ addi(r4, r1, Operand(OFFSET_OF(F, a))); |
+ __ addi(r4, r1, Operand(offsetof(F, a))); |
__ vstm(ia, r4, s6, s7); |
__ addi(r4, r4, Operand(2 * 4)); |
__ vstm(ia, r4, s0, s5); |
@@ -905,19 +905,19 @@ TEST(10) { |
__ stm(db_w, sp, r4.bit() | fp.bit() | lr.bit()); |
__ sub(fp, ip, Operand(4)); |
- __ addi(r4, r0, Operand(OFFSET_OF(D, h) + 8)); |
+ __ addi(r4, r0, Operand(offsetof(D, h) + 8)); |
__ vldm(db_w, r4, d4, d7); |
__ vldm(db_w, r4, d0, d3); |
- __ addi(r4, r0, Operand(OFFSET_OF(D, h) + 8)); |
+ __ addi(r4, r0, Operand(offsetof(D, h) + 8)); |
__ vstm(db_w, r4, d0, d5); |
__ vstm(db_w, r4, d6, d7); |
- __ addi(r4, r1, Operand(OFFSET_OF(F, h) + 4)); |
+ __ addi(r4, r1, Operand(offsetof(F, h) + 4)); |
__ vldm(db_w, r4, s4, s7); |
__ vldm(db_w, r4, s0, s3); |
- __ addi(r4, r1, Operand(OFFSET_OF(F, h) + 4)); |
+ __ addi(r4, r1, Operand(offsetof(F, h) + 4)); |
__ vstm(db_w, r4, s0, s5); |
__ vstm(db_w, r4, s6, s7); |
@@ -996,28 +996,28 @@ TEST(11) { |
Assembler assm(isolate, NULL, 0); |
// Test HeapObject untagging. |
- __ ldr(r1, MemOperand(r0, OFFSET_OF(I, a))); |
+ __ ldr(r1, MemOperand(r0, offsetof(I, a))); |
__ mov(r1, Operand(r1, ASR, 1), SetCC); |
__ adc(r1, r1, Operand(r1), LeaveCC, cs); |
- __ str(r1, MemOperand(r0, OFFSET_OF(I, a))); |
+ __ str(r1, MemOperand(r0, offsetof(I, a))); |
- __ ldr(r2, MemOperand(r0, OFFSET_OF(I, b))); |
+ __ ldr(r2, MemOperand(r0, offsetof(I, b))); |
__ mov(r2, Operand(r2, ASR, 1), SetCC); |
__ adc(r2, r2, Operand(r2), LeaveCC, cs); |
- __ str(r2, MemOperand(r0, OFFSET_OF(I, b))); |
+ __ str(r2, MemOperand(r0, offsetof(I, b))); |
// Test corner cases. |
__ mov(r1, Operand(0xffffffff)); |
__ mov(r2, Operand::Zero()); |
__ mov(r3, Operand(r1, ASR, 1), SetCC); // Set the carry. |
__ adc(r3, r1, Operand(r2)); |
- __ str(r3, MemOperand(r0, OFFSET_OF(I, c))); |
+ __ str(r3, MemOperand(r0, offsetof(I, c))); |
__ mov(r1, Operand(0xffffffff)); |
__ mov(r2, Operand::Zero()); |
__ mov(r3, Operand(r2, ASR, 1), SetCC); // Unset the carry. |
__ adc(r3, r1, Operand(r2)); |
- __ str(r3, MemOperand(r0, OFFSET_OF(I, d))); |
+ __ str(r3, MemOperand(r0, offsetof(I, d))); |
__ mov(pc, Operand(lr)); |