You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing PIC32 (MIPS RISC) code, and I have a request for how macros are called.
PIC32, like many RISC processors, has a delay slot after a branch. The delay slot is intended for use by compilers, but I want to ignore it for now since I'm writing the assembler code myself. So I'm writing code like:
bne $zero, $t1, there
nop
I wrote a macro (actually one for each branch instruction) like this:
.macro _bne(r1,r2,x)
bne r1,r2,x
nop
.endm
and it's called like this:
_bne($zero, $t1, there)
The parentheses make this a little too dissimilar to the surrounding code for my taste, and I'd like to to this:
_bne $zero, $t1, there
Would that be possible?
The text was updated successfully, but these errors were encountered:
I totally feel your pain on that one.. got bit by forgetting the delay slot before. I'm not sure about this one.. kind of don't want to make that code more complicated than it is. I'd probably want to do a cleanup in that module (was wanting to make it more C++-like anyway) and I think I'd probably want different syntax than ".macro" to make it different than a normal macro... have to think about it...
I think if I did this, I'd either want to do a refactor of the macro code or just have a different feature built around it. I'd probably prefer doing that myself...
This is more a feature request than an issue.
I'm writing PIC32 (MIPS RISC) code, and I have a request for how macros are called.
PIC32, like many RISC processors, has a delay slot after a branch. The delay slot is intended for use by compilers, but I want to ignore it for now since I'm writing the assembler code myself. So I'm writing code like:
I wrote a macro (actually one for each branch instruction) like this:
and it's called like this:
The parentheses make this a little too dissimilar to the surrounding code for my taste, and I'd like to to this:
Would that be possible?
The text was updated successfully, but these errors were encountered: