circuitpython/tests/inlineasm/asmbitops.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
196 B
Python
Raw Normal View History

@micropython.asm_thumb
def clz(r0):
clz(r0, r0)
2021-03-15 09:57:36 -04:00
print(clz(0xF0))
print(clz(0x8000))
2021-03-15 09:57:36 -04:00
@micropython.asm_thumb
def rbit(r0):
rbit(r0, r0)
2021-03-15 09:57:36 -04:00
print(hex(rbit(0xF0)))
print(hex(rbit(0x8000)))