diff --git a/arm-asm.c b/arm-asm.c index d4d4930e..4c663c3e 100644 --- a/arm-asm.c +++ b/arm-asm.c @@ -83,6 +83,11 @@ static void asm_nullary_opcode(int token) case TOK_ASM_nopeq: asm_emit_opcode(token, 0xd << 21); // mov r0, r0 break; + case TOK_ASM_wfeeq: + asm_emit_opcode(token, 0x320f002); + case TOK_ASM_wfieq: + asm_emit_opcode(token, 0x320f003); + break; default: expect("nullary instruction"); } @@ -103,6 +108,8 @@ ST_FUNC void asm_opcode(TCCState *s1, int token) switch (ARM_INSTRUCTION_GROUP(token)) { case TOK_ASM_nopeq: + case TOK_ASM_wfeeq: + case TOK_ASM_wfieq: return asm_nullary_opcode(token); default: expect("known instruction"); diff --git a/arm-tok.h b/arm-tok.h index bcbabe3a..6d9c5962 100644 --- a/arm-tok.h +++ b/arm-tok.h @@ -52,3 +52,5 @@ /* Note: add new tokens after nop (MUST always use DEF_ASM_CONDED) */ DEF_ASM_CONDED(nop) + DEF_ASM_CONDED(wfe) + DEF_ASM_CONDED(wfi)