MIPS: Disabling "div" traps in GAS
Marshall B. Rogers
Sun Jan 17 20:44:00 GMT 2010
Thanks for your response.
> I am not sure I understand your question (e.g. is this C you're
> compiling, inline assembly or assembly?). In the *assembler* we make
> the decision whether to treat div as macro (and add the divide-by-zero
> check) or as the the machine insn itself based on the destination
> operand. In order to assemble into the machine insn without the check
> use the three register-operand version with zero as the destination
Sorry about the ambiguity - I am assembling .S files (but doing so
through GCC). Using $0 as the destination solved the problem.
> Right, this is to be consistent with how we expect the same thing on
> input to the assembler.
I can see that now. I should have taken a hint from the disassembly as
to the correct way to write the instruction, heh.
Thanks so much!
More information about the Binutils