BOTONE bug?
Seairth
Posts: 2,474
in Propeller 2
BOTONE d, #0 wc, wz ' D = $0000_001F, C=1, Z=0 MOV s, #0 BOTONE d, s wc, wz ' D = $0000_0002, C=0, Z=0
In the second case, I think C is being written to the result. Note, however, that I was expecting the same behavior as TOPONE for this:
TOPONE d, #0 wc, wz ' D = $0000_0000, C=1, Z=1 MOV s, #0 TOPONE d, s wc, wz ' D = $0000_0000, C=1, Z=1
Comments
Yes, that way a full test coverage is achieved. It may detect problems in the hardware and/or software, ie PNut encoding or other assembler/compiler
Ok. That would account for the first version of BOTONE, but not the second one.
@moderators, please close and sink this thread.
I'll try your example cases out, myself.
Are you using RET WC,WZ in your test code.
I'm seeing an issue here that might explain your strange results.
See your "CALL" thread.
I just verified that, indeed, I was storing {Z, C} into stacks and then restoring them as {C, Z}, causing them to become switched. I just fixed this in the Verilog and it will be out in the next FPGA update.
I had switched the order of Z and C a while back, but didn't remember to update those stack input sections.
excellent!
That explains some of the "weirdness"