Just a thought...
danielstritt
Posts: 43
As I learn more about PASM and PropGCC, I stumbled on the fact that the "B" registers that arent used on the prop1 are still there, lying dormant. So per cog, you get DIRB and OUTB to save and load data with. If you aren't using counters, you get 4 more with FRQx and PHSx. My tests show that so far you can use them like any other general purpose register, since the hardware will not change them. I've never seen anyone talking about this, so I assume it's either common knowledge that we are expected to know, or just something people never thought about. The reason I bring it up, I don't know how the compiler for PropGCC works, I know nothing of compiler development, but if a program uses the cog space automatically through optimazation, is it possible to use those guarenteed unused B registers as well? Possibly an optimizing option for the counter registers, to make sure they don't get clobbered if you are using counters?
Once again, sorry if this is already known, I just thought I might share, if for anything, for those that didn't realize this, and are learning PASM, they should be able to use up to 6 more longs of data. Of course, someone correct me if I am all wrong here. I still worry that it might be a bad idea to use them sometimes.
Thanks
Daniel
Once again, sorry if this is already known, I just thought I might share, if for anything, for those that didn't realize this, and are learning PASM, they should be able to use up to 6 more longs of data. Of course, someone correct me if I am all wrong here. I still worry that it might be a bad idea to use them sometimes.
Thanks
Daniel
Comments
The B registers are basically unused and you can put whatever you want in them. Same for the PHS and FRQ registers as long as you don't turn the CTRs on. These details have been know for a long time to people who program the chip in ASM.
Its a bad idea to use the register as general purpose places to store data unless you REALLY need them. Otherwise you are making your code unreadable.
Several of us have hijacked the DIRB/INB/OUTB registers in debuggers and other applications in the past. There was a point when we were hoping that the P8x32b device would appear that made use of the registers, so I'm fairly certain they are available for propeller-gcc users. I'm not sure if the P8x32b will ever appear, but I would love to see it.