This piece fails with error "Cannot generate code within the allowed number of passes" for NNN = 128 and 129. First I thought it's because it cannot compute lbl_b position, but it works for NNN 127 and below, as well as for NNN = 130 and above.
If not a bug, what is the exact reason so that I could forsee such behavior in the future? Thanks in advance
There is no solution unless you force the longer encoding with a small sized offset. You will have to change the macro to detect it. Maybe create a new variable that keeps track of previous passes attempts. Or perhaps change the "else" block to create two bytes of dummy data to match the other block.
Your problem was caused originally by the fact that when the relative offset was out of range, no bytes for instruction opcode were generated and therefore the relative offset shortened, leading to contradiction. You could read that statement as "if this block of code is longer than X, this instruction is not generated". When not generating an instruction causes the block to be shorter than X, that statement becomes contradictory.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum