From 28adab36c795691a9064495a18d44ebc69c5db64 Mon Sep 17 00:00:00 2001 From: Damien George Date: Tue, 23 Feb 2016 15:20:39 +0000 Subject: py/emitinlinethumb: Use qstrs instead of char* for names of asm ops. Reduces code size by 112 bytes on Thumb2 arch, and makes assembler faster because comparison can be a simple equals instead of a string compare. Not all ops have been converted, only those that were simple to convert and reduced code size. --- py/qstrdefs.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'py/qstrdefs.h') diff --git a/py/qstrdefs.h b/py/qstrdefs.h index ad57dd390..ac0703a52 100644 --- a/py/qstrdefs.h +++ b/py/qstrdefs.h @@ -114,6 +114,50 @@ Q(label) Q(align) Q(data) Q(uint) +Q(nop) +Q(mov) +Q(and_) +Q(cmp) +Q(add) +Q(sub) +Q(lsl) +Q(lsr) +Q(asr) +Q(ldr) +Q(ldrb) +Q(ldrh) +Q(str) +Q(strb) +Q(strh) +Q(b) +Q(bl) +Q(bx) +Q(push) +Q(pop) +Q(cpsid) +Q(cpsie) +Q(wfi) +Q(clz) +Q(rbit) +Q(movw) +Q(movt) +Q(movwt) +Q(mrs) +Q(sdiv) +Q(udiv) +Q(ldrex) +Q(strex) +#if MICROPY_EMIT_INLINE_THUMB_FLOAT +Q(vcmp) +Q(vneg) +Q(vcvt_f32_s32) +Q(vcvt_s32_f32) +Q(vsqrt) +Q(vmov) +Q(vmrs) +Q(vldr) +Q(vstr) +#endif #endif Q(builtins) -- cgit v1.2.3