8500 loader: need __divmoddi4 and __udivmoddi4

Review Request #628 — Created July 15, 2017 and submitted

tsoome
illumos-gate
8500
b8ca630...
general
8500 loader: need __divmoddi4 and __udivmoddi4

no targeted test, just boot. Need to devise something better, likely some nice forth script:)

  • 0
  • 0
  • 1
  • 0
  • 1
Description From Last Updated
rm
  1. 
      
  2. usr/src/boot/lib/libstand/qdivrem.c (Diff revision 1)
     
     
    So, the implementation of __divmoddi4 matches most of those that we find in other compiler runtimes. However, in most of the others, __udivmoddi4 seems more complicated. Is that because the hard work is actually all in __qdivrem()? I haven't quite convinced myself that they are logically equivalent to say the llvm compiler-rt one.
    1. I did look at compiler-rt ones when just saw this review and they are exactly the same. Are we looking at the different source?

    2. Hmm. I'm now suspicious that the one I found was from a much older version of llvm, as this came from apple.com. Yuri, where did you find the one you were looking at?

    3. at least one most certainly did look like the same but I did not spend too much time on it.

    4. Yes, one confusion is about where is the actual "worker" implemented - I did rename __qdivrem to __udivmoddi4 to fix it + we do not really need the extra small wrapper. There seem to be alternate references, one is referring to implementation in PPC manual (https://cr.yp.to/2005-590/powerpc-cwg.pdf), another is referring directly to Knuth's vol. 2.

  3. 
      
igork
  1. Ship It!
  2. 
      
tsoome
danmcd
  1. Ship It!
  2. 
      
yuripv
  1. Ship It!
  2. 
      
igork
  1. Ship It!
  2. 
      
rm
  1. Ship It!
  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...