Open dmikushin opened 6 years ago
Looks like pushm
and popm
instructions are from 430X isa extension.
pushm #n, Rm
is like 'push every register starting from Rm till R(m-n+1) to stack'. So, pushm #7, r10
should be equivalent to the following sequence:
push r10
push r9
push r8
push r7
push r6
push r5
push r4
So, yes, we need a case for !MSP430X. Also we need to start planning to support MSP430X... The latter might be a bit tricky...
@asl ~22 insts to implement for MSP430X (manual, pp. 45-46: http://www.ti.com/lit/ug/slau391f/slau391f.pdf)
@chbessonova Thanks for the pointers! I was able to cook stubs for pushm/popm to get them pass through.
FWIW WIP sketch is here: https://github.com/dmikushin/msp430-clang/commit/bf759f7523d3723eba91d0e74cc8a692334cd3c9
@dmikushin We do not support "X" isa. So you could not simply "add" pushm instruction, because it does not exist on msp430 :)
Sure: this will work on MSP430X only. ATM I needed a stub for compilation, that could later split into an "X" hw feature. Otherwise, we should drop ChibiOS in favor of something strictly 430-conformant.
But what prevented you from modifying the source code if you needed the stub?
So, yes, we need a case for !MSP430X. Also we need to start planning to support MSP430X... The latter might be a bit tricky...
It was driven by your comment.
Sorry, I was not not clear. I wrote that we need a special case in the source code to support non-X case. And "planning" does not mean "start coding right now" :)
ChibiOS compilation dies here due to "invalid instruction mnemonic pushm.w" on line
asm volatile ("pushm.w #7, R10");