From 2ac9070399afdef48b0c548ddc0152f48f006e13 Mon Sep 17 00:00:00 2001 From: Joshua Warner Date: Tue, 25 Feb 2014 21:33:08 -0700 Subject: [PATCH] fix arm/powerpc build --- src/codegen/target/arm/assembler.cpp | 6 ++++-- src/codegen/target/arm/operations.cpp | 7 ++++--- src/codegen/target/powerpc/assembler.cpp | 9 +++++---- src/codegen/target/powerpc/operations.cpp | 9 ++++++--- 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/codegen/target/arm/assembler.cpp b/src/codegen/target/arm/assembler.cpp index e4be4f18f4..3d61fe25ed 100644 --- a/src/codegen/target/arm/assembler.cpp +++ b/src/codegen/target/arm/assembler.cpp @@ -814,7 +814,9 @@ class MyAssembler: public Assembler { unsigned blockOffset = 0; for (PoolEvent* e = b->poolEventHead; e; e = e->next) { unsigned size = e->offset - blockOffset; - memcpy(dst + dstOffset, con.code.data + b->offset + blockOffset, size); + memcpy(dst + dstOffset, + con.code.data.begin() + b->offset + blockOffset, + size); blockOffset = e->offset; dstOffset += size; @@ -857,7 +859,7 @@ class MyAssembler: public Assembler { unsigned size = b->size - blockOffset; memcpy(dst + dstOffset, - con.code.data + b->offset + blockOffset, + con.code.data.begin() + b->offset + blockOffset, size); dstOffset += size; diff --git a/src/codegen/target/arm/operations.cpp b/src/codegen/target/arm/operations.cpp index 6a4ff5ccaa..27315763d0 100644 --- a/src/codegen/target/arm/operations.cpp +++ b/src/codegen/target/arm/operations.cpp @@ -1065,9 +1065,10 @@ void branchLong(Context* con, lir::TernaryOperation op, lir::Operand* al, } if (next) { - updateOffset - (con->s, con->code.data + next, reinterpret_cast - (con->code.data + con->code.length())); + updateOffset(con->s, + con->code.data.begin() + next, + reinterpret_cast(con->code.data.begin() + + con->code.length())); } } diff --git a/src/codegen/target/powerpc/assembler.cpp b/src/codegen/target/powerpc/assembler.cpp index cc300b1768..9a12b84257 100644 --- a/src/codegen/target/powerpc/assembler.cpp +++ b/src/codegen/target/powerpc/assembler.cpp @@ -869,7 +869,9 @@ class MyAssembler: public Assembler { unsigned blockOffset = 0; for (JumpEvent* e = b->jumpEventHead; e; e = e->next) { unsigned size = e->offset - blockOffset; - memcpy(dst + dstOffset, c.code.data + b->offset + blockOffset, size); + memcpy(dst + dstOffset, + c.code.data.begin() + b->offset + blockOffset, + size); blockOffset = e->offset; dstOffset += size; @@ -903,9 +905,8 @@ class MyAssembler: public Assembler { unsigned size = b->size - blockOffset; - memcpy(dst + dstOffset, - c.code.data + b->offset + blockOffset, - size); + memcpy( + dst + dstOffset, c.code.data.begin() + b->offset + blockOffset, size); dstOffset += size; } diff --git a/src/codegen/target/powerpc/operations.cpp b/src/codegen/target/powerpc/operations.cpp index 03762d30ad..c60c125016 100644 --- a/src/codegen/target/powerpc/operations.cpp +++ b/src/codegen/target/powerpc/operations.cpp @@ -924,9 +924,12 @@ void branchLong(Context* c, lir::TernaryOperation op, lir::Operand* al, } if (next) { - updateOffset - (c->s, c->code.data + next, true, reinterpret_cast - (c->code.data + c->code.length()), 0); + updateOffset( + c->s, + c->code.data.begin() + next, + true, + reinterpret_cast(c->code.data.begin() + c->code.length()), + 0); } }