prefetch makes MOVD not work for next instruction
EricR
Posts: 35
I find that I cannot use MOVD to modify the next instruction in code immediately.· I suspect the next instruction is being prefetched, thus delaying the affect of MOVD.· If I target MOVD to the following instruction, the MOVD works as I wanted.
code:
· looptop
············· ...
············· movd Writer, DiagCogAddr ' place the desination address that we·want in the wrlong instruction
············· nop·· ' this makes a world of difference!?· Could there be pre fetching?
· Writer··· wrlong 10, DiagHubAddress ' note that·10 is a dummy field value here, it is overwritten every loop
············· ...
············· jmp #looptop
Without the NOP instruction, the affect of changing the desitnation field only works the next time around in the loop.· With the NOP instruction, the Writer WRLONG instruction works as I planned.
Can anybody confirm this prefetch?
Eric R
code:
· looptop
············· ...
············· movd Writer, DiagCogAddr ' place the desination address that we·want in the wrlong instruction
············· nop·· ' this makes a world of difference!?· Could there be pre fetching?
· Writer··· wrlong 10, DiagHubAddress ' note that·10 is a dummy field value here, it is overwritten every loop
············· ...
············· jmp #looptop
Without the NOP instruction, the affect of changing the desitnation field only works the next time around in the loop.· With the NOP instruction, the Writer WRLONG instruction works as I planned.
Can anybody confirm this prefetch?
Eric R
Comments
I found (or rather Google found) the deSilva Assembly Tutorial at http://www.vaguelogic.com/propeller/Programming/DeSilvaAssemblyTutorial.pdf . I am enjoying reading this, thanks for the reference.
Eric