This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: MIPS: Disabling "div" traps in GAS


Hi,

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
> register.

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!

Warm regards,
Marshall


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]