All pastes #2056490 Raw Edit

Anonymous

public text v1 · immutable
#2056490 ·published 2011-05-10 23:03 UTC
rendered paste body
UP1500 ~ # cat sqrt.c 
#include <math.h>

float _sqrt(float x) {
        return sqrt(x);
}

UP1500 ~ # gcc -O3 -mcpu=ev67 -c sqrt.c 
UP1500 ~ # objdump -d sqrt.o 

sqrt.o:     file format elf64-alpha


Disassembly of section .text:

0000000000000000 <_sqrt>:
   0:   00 00 bb 27     ldah    gp,0(t12)
   4:   00 00 bd 23     lda     gp,0(gp)
   8:   60 11 f0 53     sqrts   $f16,$f0
   c:   f0 ff de 23     lda     sp,-16(sp)
  10:   00 00 5e b7     stq     ra,0(sp)
  14:   0a 04 00 5c     fmov    $f0,$f10
  18:   aa 14 4a 59     cmpteq  $f10,$f10,$f10
  1c:   03 00 40 c5     fbeq    $f10,2c <_sqrt+0x2c>
  20:   00 00 5e a7     ldq     ra,0(sp)
  24:   10 00 de 23     lda     sp,16(sp)
  28:   01 80 fa 6b     ret
  2c:   00 00 7d a7     ldq     t12,0(gp)
  30:   00 40 5b 6b     jsr     ra,(t12),34 <_sqrt+0x34>
  34:   00 00 ba 27     ldah    gp,0(ra)
  38:   00 00 bd 23     lda     gp,0(gp)
  3c:   f8 ff ff c3     br      20 <_sqrt+0x20>
UP1500 ~ # ccc -fast -host -c sqrt.c 
UP1500 ~ # objdump -d sqrt.o 

sqrt.o:     file format elf64-alpha


Disassembly of section .text:

0000000000000000 <_sqrt>:
   0:   00 00 bb 27     ldah    gp,0(t12)
   4:   00 00 bd 23     lda     gp,0(gp)
   8:   f0 ff de 23     lda     sp,-16(sp)
   c:   00 00 5e b7     stq     ra,0(sp)
  10:   00 00 7d a7     ldq     t12,0(gp)
  14:   00 40 5b 6b     jsr     ra,(t12),18 <_sqrt+0x18>
  18:   80 04 1f 50     itoft   v0,$f0
  1c:   00 00 ba 27     ldah    gp,0(ra)
  20:   00 00 5e a7     ldq     ra,0(sp)
  24:   10 00 de 23     lda     sp,16(sp)
  28:   04 00 bd 23     lda     gp,4(gp)
  2c:   80 17 e0 5b     cvtqs   $f0,$f0
  30:   01 80 fa 6b     ret