jserv / amacc

Small C Compiler generating ELF executable Arm architecture, supporting JIT execution
Other
1.01k stars 159 forks source link

Can the codegen() for IR instruction CLCA be removed? #76

Closed HPCguy closed 2 years ago

HPCguy commented 2 years ago

CLCA is never used. I think it should be removed, since it is misleading.

HPCguy commented 2 years ago

The answer appears to be no, but I can't find the magic route that calls the CLCA IR instruction. Closing this ticket.

jserv commented 2 years ago

Opcode CLCA is meant to clearing cache, used by JIT compilation.

HPCguy commented 2 years ago

Thanks for replying. The issue is that I couldn't find where the CLCA IR instruction was added to the IR for the executable. When I remove the CLCA case statement, amacc dies in codegen() saying the CLCA IR node is being executed, but there is no case statement for it. So codegen() is being called with IR opcode 46 from somewhere, I just can't find where.