diff options
author | Mike Pall <mike> | 2011-10-25 01:18:59 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2011-10-25 01:18:59 +0200 |
commit | 9df9c7ef730c6af4c3b3f137f8070be29a9bd946 (patch) | |
tree | bbcefd97aa9a6792dd1803777b0340a498ac61cf /dynasm | |
parent | bec4d20fb615ccb4e0ac52955aa55b885f020f45 (diff) | |
download | luajit-9df9c7ef730c6af4c3b3f137f8070be29a9bd946.tar.gz luajit-9df9c7ef730c6af4c3b3f137f8070be29a9bd946.tar.bz2 luajit-9df9c7ef730c6af4c3b3f137f8070be29a9bd946.zip |
PPC: Fix externally provided relocation offsets in DynASM.
Diffstat (limited to 'dynasm')
-rw-r--r-- | dynasm/dasm_ppc.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dynasm/dasm_ppc.h b/dynasm/dasm_ppc.h index 4b4ffe8a..645e0601 100644 --- a/dynasm/dasm_ppc.h +++ b/dynasm/dasm_ppc.h | |||
@@ -342,7 +342,7 @@ int dasm_encode(Dst_DECL, void *buffer) | |||
342 | case DASM_STOP: case DASM_SECTION: goto stop; | 342 | case DASM_STOP: case DASM_SECTION: goto stop; |
343 | case DASM_ESC: *cp++ = *p++; break; | 343 | case DASM_ESC: *cp++ = *p++; break; |
344 | case DASM_REL_EXT: | 344 | case DASM_REL_EXT: |
345 | n = DASM_EXTERN(Dst, (unsigned char *)cp, (ins & 2047), 1); | 345 | n = DASM_EXTERN(Dst, (unsigned char *)cp, (ins & 2047), 1) - 4; |
346 | goto patchrel; | 346 | goto patchrel; |
347 | case DASM_ALIGN: | 347 | case DASM_ALIGN: |
348 | ins &= 255; while ((((char *)cp - base) & ins)) *cp++ = 0x60000000; | 348 | ins &= 255; while ((((char *)cp - base) & ins)) *cp++ = 0x60000000; |