fix arm/powerpc build

This commit is contained in:
Joshua Warner 2014-02-25 21:33:08 -07:00
parent db19c7b3a2
commit 2ac9070399
4 changed files with 19 additions and 12 deletions

View File

@ -814,7 +814,9 @@ class MyAssembler: public Assembler {
unsigned blockOffset = 0; unsigned blockOffset = 0;
for (PoolEvent* e = b->poolEventHead; e; e = e->next) { for (PoolEvent* e = b->poolEventHead; e; e = e->next) {
unsigned size = e->offset - blockOffset; 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; blockOffset = e->offset;
dstOffset += size; dstOffset += size;
@ -857,7 +859,7 @@ class MyAssembler: public Assembler {
unsigned size = b->size - blockOffset; unsigned size = b->size - blockOffset;
memcpy(dst + dstOffset, memcpy(dst + dstOffset,
con.code.data + b->offset + blockOffset, con.code.data.begin() + b->offset + blockOffset,
size); size);
dstOffset += size; dstOffset += size;

View File

@ -1065,9 +1065,10 @@ void branchLong(Context* con, lir::TernaryOperation op, lir::Operand* al,
} }
if (next) { if (next) {
updateOffset updateOffset(con->s,
(con->s, con->code.data + next, reinterpret_cast<intptr_t> con->code.data.begin() + next,
(con->code.data + con->code.length())); reinterpret_cast<intptr_t>(con->code.data.begin()
+ con->code.length()));
} }
} }

View File

@ -869,7 +869,9 @@ class MyAssembler: public Assembler {
unsigned blockOffset = 0; unsigned blockOffset = 0;
for (JumpEvent* e = b->jumpEventHead; e; e = e->next) { for (JumpEvent* e = b->jumpEventHead; e; e = e->next) {
unsigned size = e->offset - blockOffset; 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; blockOffset = e->offset;
dstOffset += size; dstOffset += size;
@ -903,9 +905,8 @@ class MyAssembler: public Assembler {
unsigned size = b->size - blockOffset; unsigned size = b->size - blockOffset;
memcpy(dst + dstOffset, memcpy(
c.code.data + b->offset + blockOffset, dst + dstOffset, c.code.data.begin() + b->offset + blockOffset, size);
size);
dstOffset += size; dstOffset += size;
} }

View File

@ -924,9 +924,12 @@ void branchLong(Context* c, lir::TernaryOperation op, lir::Operand* al,
} }
if (next) { if (next) {
updateOffset updateOffset(
(c->s, c->code.data + next, true, reinterpret_cast<intptr_t> c->s,
(c->code.data + c->code.length()), 0); c->code.data.begin() + next,
true,
reinterpret_cast<intptr_t>(c->code.data.begin() + c->code.length()),
0);
} }
} }