Related articles |
---|
modulus and remainder lockner@chaos.cns.uni.edu (Matthew J. Lockner) (2001-06-28) |
Re: modulus and remainder Peter-Lawrence.Montgomery@cwi.nl (2001-07-01) |
Re: modulus and remainder joachim_d@gmx.de (Joachim Durchholz) (2001-07-01) |
From: | "Matthew J. Lockner" <lockner@chaos.cns.uni.edu> |
Newsgroups: | comp.compilers |
Date: | 28 Jun 2001 23:51:56 -0400 |
Organization: | University of Northern Iowa |
Keywords: | arithmetic, question |
Posted-Date: | 28 Jun 2001 23:51:56 EDT |
Hello all,
Does anyone know of a thorough reference on compiling modulus and remainder
operators in expressions? I was looking at the output of gcc on some small
test C functions to get some insights. Sometimes it uses a divide
instruction, and uses the remainder left in a register by the instruction.
That seems like an obvious approach, but it doesn't always use that
technique. I would like to see some of the theory behind this and other
approaches. Ideally I would also like to see how translating modulus
operations differs from translating remainder operations, where each
operator is defined as it would be in Ada, for example (i.e., where the two
operations might yield different results).
Thanks,
M. Lockner
Return to the
comp.compilers page.
Search the
comp.compilers archives again.