Advertisement
Guest User

Rosetta:gray code : asm code for ada

a guest
Apr 18th, 2011
385
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     .file   "gray_5.adb"
  2. .globl _gray_5_E
  3.     .data
  4. _gray_5_E:
  5.     .space 1
  6.     .text
  7.     .align 2
  8. .globl _gray_5__encode
  9.     .def    _gray_5__encode;    .scl    2;  .type   32; .endef
  10. _gray_5__encode:
  11. LFB4:
  12.     subl    $4, %esp
  13. LCFI0:
  14.     movl    8(%esp), %eax
  15.     movb    %al, (%esp)
  16.     movzbl  (%esp), %eax
  17.     shrb    %al
  18.     xorb    (%esp), %al
  19.     nop
  20.     addl    $4, %esp
  21.     ret
  22. LFE4:
  23.     .align 2
  24. .globl _gray_5__decode
  25.     .def    _gray_5__decode;    .scl    2;  .type   32; .endef
  26. _gray_5__decode:
  27. LFB5:
  28.     subl    $20, %esp
  29. LCFI1:
  30.     movl    24(%esp), %eax
  31.     movb    %al, (%esp)
  32.     movb    $16, 15(%esp)
  33.     movzbl  (%esp), %eax
  34.     andl    $16, %eax
  35.     movb    %al, 14(%esp)
  36.     movzbl  14(%esp), %eax
  37.     movb    %al, 13(%esp)
  38.     movl    $2, 16(%esp)
  39. L6:
  40.     cmpl    $5, 16(%esp)
  41.     jg  L5
  42.     shrb    14(%esp)
  43.     shrb    15(%esp)
  44.     movzbl  15(%esp), %edx
  45.     movzbl  (%esp), %eax
  46.     andl    %edx, %eax
  47.     xorb    %al, 14(%esp)
  48.     movzbl  14(%esp), %eax
  49.     addb    %al, 13(%esp)
  50.     addl    $1, 16(%esp)
  51.     jmp L6
  52. L5:
  53.     movzbl  13(%esp), %eax
  54.     addl    $20, %esp
  55.     ret
  56. LFE5:
  57.     .section    .eh_frame,"w"
  58. Lframe1:
  59.     .long   LECIE1-LSCIE1
  60. LSCIE1:
  61.     .long   0x0
  62.     .byte   0x1
  63.     .def    ___gnat_eh_personality; .scl    2;  .type   32; .endef
  64.     .ascii "zP\0"
  65.     .uleb128 0x1
  66.     .sleb128 -4
  67.     .byte   0x8
  68.     .uleb128 0x5
  69.     .byte   0x0
  70.     .long   ___gnat_eh_personality
  71.     .byte   0xc
  72.     .uleb128 0x4
  73.     .uleb128 0x4
  74.     .byte   0x88
  75.     .uleb128 0x1
  76.     .align 4
  77. LECIE1:
  78. LSFDE1:
  79.     .long   LEFDE1-LASFDE1
  80. LASFDE1:
  81.     .long   LASFDE1-Lframe1
  82.     .long   LFB4
  83.     .long   LFE4-LFB4
  84.     .uleb128 0x0
  85.     .byte   0x4
  86.     .long   LCFI0-LFB4
  87.     .byte   0xe
  88.     .uleb128 0x8
  89.     .align 4
  90. LEFDE1:
  91. LSFDE3:
  92.     .long   LEFDE3-LASFDE3
  93. LASFDE3:
  94.     .long   LASFDE3-Lframe1
  95.     .long   LFB5
  96.     .long   LFE5-LFB5
  97.     .uleb128 0x0
  98.     .byte   0x4
  99.     .long   LCFI1-LFB5
  100.     .byte   0xe
  101.     .uleb128 0x18
  102.     .align 4
  103. LEFDE3:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement