Hi,
Two-address instructions are represented as normal three-address instructions with a Desc bit that indicates the first two operands are tied together. The question is, should the second operand have a <kill> flag?
b: %R0<def> = MUL %R0<kill>, %R1<kill>
I think the current policy is a: There should be no kill-flag. The machine code verifier has code to handle the missing <kill> flag, and the regscavenger asserts if the <kill> flag is set.
Recently somebody (possibly myself) has been setting <kill> flags on my tied use operands, causing regscavenger to assert.
I just want to verify the policy regarding two-address <kill> flags:
Case a: <kill> is not allowed. I should add a check to the verifier for this. Find out who is setting the flags.
Case b: <kill> is mandatory. Remove special-case code from verifier, fix regscavenger.
Case c: <kill> is don't care. Fix regscavenger.
My vote goes to b: Then you don't need special-case code for two-address instructions. (Except for places that need special treatment of two-address instrs for other reasons).
/jakob
Hi,
Two-address instructions are represented as normal three-address
instructions with a Desc bit that indicates the first two operands are
tied together. The question is, should the second operand have a
<kill> flag?
a: %R0<def> = MUL %R0, %R1<kill>
b: %R0<def> = MUL %R0<kill>, %R1<kill>
I think the current policy is a: There should be no kill-flag. The
Right.
machine code verifier has code to handle the missing <kill> flag, and
the regscavenger asserts if the <kill> flag is set.
Recently somebody (possibly myself) has been setting <kill> flags on
my tied use operands, causing regscavenger to assert.
I just want to verify the policy regarding two-address <kill> flags:
Case a: <kill> is not allowed. I should add a check to the verifier
for this. Find out who is setting the flags.
Case b: <kill> is mandatory. Remove special-case code from verifier,
fix regscavenger.
Case c: <kill> is don't care. Fix regscavenger.
It's 'a'.
My vote goes to b: Then you don't need special-case code for two-
address instructions. (Except for places that need special treatment
of two-address instrs for other reasons).
Two-address operands are being treated differently because they are indeed different, we are not about to change that.
Evan
Thanks, I'll add a check to the verifier so it barfs on kill flags. Currently it implements c: Don't care.
/jakob