diff options
author | Damien George <damien.p.george@gmail.com> | 2016-01-07 14:54:13 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-01-07 16:34:11 +0000 |
commit | ea8be373a975356808a19a79f1dd20383bec82ba (patch) | |
tree | e514c9d912b842c52568bcc26d1f9f2f64c11d06 /tests/inlineasm | |
parent | 47dc5922cab047003acbdb404b9e151f343f9679 (diff) | |
download | micropython-ea8be373a975356808a19a79f1dd20383bec82ba.tar.gz micropython-ea8be373a975356808a19a79f1dd20383bec82ba.zip |
py/inlinethumb: Remove 30-bit restriction on movwt instruction.
movwt can now move a full 32-bit constant into a register.
Diffstat (limited to 'tests/inlineasm')
-rw-r--r-- | tests/inlineasm/asmconst.py | 8 | ||||
-rw-r--r-- | tests/inlineasm/asmconst.py.exp | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/tests/inlineasm/asmconst.py b/tests/inlineasm/asmconst.py new file mode 100644 index 0000000000..299a25093c --- /dev/null +++ b/tests/inlineasm/asmconst.py @@ -0,0 +1,8 @@ +# test constants in assembler + +@micropython.asm_thumb +def c1(): + movwt(r0, 0xffffffff) + movwt(r1, 0xf0000000) + sub(r0, r0, r1) +print(hex(c1())) diff --git a/tests/inlineasm/asmconst.py.exp b/tests/inlineasm/asmconst.py.exp new file mode 100644 index 0000000000..3ef9fcabd7 --- /dev/null +++ b/tests/inlineasm/asmconst.py.exp @@ -0,0 +1 @@ +0xfffffff |