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.
This commit is contained in:
Damien George
2016-02-23 15:20:39 +00:00
parent e9d1a94bf0
commit 28adab36c7
2 changed files with 92 additions and 47 deletions

View File

@@ -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)