DynASM/ARM64: Fix NOP instruction for aligment

Reported by Marius Wachtler.
This commit is contained in:
Mike Pall 2022-03-25 15:31:17 +01:00
parent 43ebb949a2
commit e2c312e0de

View File

@ -438,7 +438,7 @@ int dasm_encode(Dst_DECL, void *buffer)
n = DASM_EXTERN(Dst, (unsigned char *)cp, (ins&2047), !(ins&2048)); n = DASM_EXTERN(Dst, (unsigned char *)cp, (ins&2047), !(ins&2048));
goto patchrel; goto patchrel;
case DASM_ALIGN: case DASM_ALIGN:
ins &= 255; while ((((char *)cp - base) & ins)) *cp++ = 0xe1a00000; ins &= 255; while ((((char *)cp - base) & ins)) *cp++ = 0xd503201f;
break; break;
case DASM_REL_LG: case DASM_REL_LG:
if (n < 0) { if (n < 0) {