Strength Reduction for Sparc v8 and others

Manuel Picard <>
6 Jul 1999 12:05:54 -0400

          From comp.compilers

Related articles
Strength Reduction for Sparc v8 and others (Manuel Picard) (1999-07-06)
Re: Strength Reduction for Sparc v8 and others (1999-07-10)
| List of all articles for this month |

From: Manuel Picard <>
Newsgroups: comp.compilers
Date: 6 Jul 1999 12:05:54 -0400
Organization: IRISA, Campus de Beaulieu, 35042 Rennes Cedex, FRANCE
Keywords: sparc, arithmetic, question, comment

  Hello everybody ,

I have 2 questions to submit :

1) Does anyone knows where to get some informations on how GCC does
strength reduction for MUL/DIV operations, when multiplying/dividing
by a constant ?

I found an algorithm that performs the same reductions as GCC in the
better cases, (I mean low constant as Reg *5, Reg * 54,...) but
unfortunately, in the worse cases, GCC has twice less instructions
than me.

(Worse cases => Reg * or / 0x1010101010101010...1010 that leads to ~10
instructions for GCC and ~20 for me)

2) Where can I get extensive information on Sparc and how instructions
      (i.e. : Delay Slot, stalling of registers in some op., ...)
  Can anyone help ?
[SPARC International sells manuals on-line at I
have the V8 book which defines the architecture but is deliberately
vague about implementation details since there are multiple implementations
of the V8 architecture. -John]

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.