asm{a,b}: 'uebersichtlicher'
authorBernhard Urban <lewurm@gmail.com>
Mon, 15 Mar 2010 10:55:41 +0000 (11:55 +0100)
committerBernhard Urban <lewurm@gmail.com>
Mon, 15 Mar 2010 10:57:27 +0000 (11:57 +0100)
asma/asma.s
asmb/asmb.s

index d2bacedb9fb85fe397711d01446626ff96be90c9..d17f4e1ae72efd795c7fe7a832dd7d7328ece8ff 100644 (file)
@@ -1,5 +1,3 @@
-       .file   "asma.c"
-
        .data
        .align 16
 const65:
@@ -17,9 +15,7 @@ constc0:
 
        .text
 .globl asma
-       .type   asma, @function
 asma:
-.LFB2:
        // folgendes kann umgeformt werden (max_t = 127)
        // X = 'Z' + 1 + min_t - 'A' > c + min_t - 'A' ? 0xff : 0
        // X =      -c + max_t + 'A' > - 'Z' -1 + max_t + 'A' ? 0xff : 0
@@ -54,35 +50,3 @@ asma:
        movdqu %xmm11, (%rax)
 
        ret
-.LFE2:
-       .size   asma, .-asma
-       .section        .eh_frame,"a",@progbits
-.Lframe1:
-       .long   .LECIE1-.LSCIE1
-.LSCIE1:
-       .long   0x0
-       .byte   0x1
-       .string "zR"
-       .uleb128 0x1
-       .sleb128 -8
-       .byte   0x10
-       .uleb128 0x1
-       .byte   0x3
-       .byte   0xc
-       .uleb128 0x7
-       .uleb128 0x8
-       .byte   0x90
-       .uleb128 0x1
-       .align 8
-.LECIE1:
-.LSFDE1:
-       .long   .LEFDE1-.LASFDE1
-.LASFDE1:
-       .long   .LASFDE1-.Lframe1
-       .long   .LFB2
-       .long   .LFE2-.LFB2
-       .uleb128 0x0
-       .align 8
-.LEFDE1:
-       .ident  "GCC: (Debian 4.3.2-1.1) 4.3.2"
-       .section        .note.GNU-stack,"",@progbits
index 8fb92b199a473241013aeb4388f95ef5258e55e3..6597fb060921b50267aee5ff72cf88233696f7cc 100644 (file)
@@ -20,9 +20,7 @@ const00:
 
        .text
 .globl asmb
-       .type   asmb, @function
 asmb:
-.LFB2:
        //speicheradresse des parameters zurueckgeben
        mov %rdi, %rax
 
@@ -58,99 +56,4 @@ asmb:
        //ist %ecx gleich null? dann die naechsten 16byte bitte
        jecxz .nextround
 
-/*
-       //===============
-       //ab hier uebler hax um nach \0 trotzdem die gleichen bytes wie
-       //input zu haben, also um selbiges verhalten wie asmb_ref zu erzwingen
-
-       //\0 byte stelle durch rausfinden des MSB des %ecx
-       bsf %ecx, %r11d
-
-       //das ergebnis zweimal abspeichern
-       mov %r11d, %ecx
-
-       //hint: in %xmm9 ist differenz gespeichert (vgl .differenz)
-
-       //leider shiften nur mit immediate! :(
-       btr $3, %r11d
-       jnc .rechtsshift1
-       psrldq $8, %xmm9
-
-.rechtsshift1:
-       btr $2, %r11d
-       jnc .rechtsshift2
-       psrldq $4, %xmm9
-
-.rechtsshift2:
-       btr $1, %r11d
-       jnc .rechtsshift3
-       psrldq $2, %xmm9
-
-.rechtsshift3:
-       btr $0, %r11d
-       jnc .linksshift
-       psrldq $1, %xmm9
-#==================
-.linksshift:
-       btr $3, %ecx
-       jnc .linksshift1
-       pslldq $8, %xmm9
-
-.linksshift1:
-       btr $2, %ecx
-       jnc .linksshift2
-       pslldq $4, %xmm9
-
-.linksshift2:
-       btr $1, %ecx
-       jnc .linksshift3
-       pslldq $2, %xmm9
-
-.linksshift3:
-       btr $0, %ecx
-       jnc .endshift
-       pslldq $1, %xmm9
-
-.endshift:
-       //betreffende speicherstelle in %xmm11 laden
-       movdqu -16(%rdi), %xmm11
-       //und overhead wieder subtrahieren
-       psubb %xmm9, %xmm11
-
-       //ergebnis zurueckspielen und fertig \o/
-       movdqu %xmm11, -16(%rdi)
-*/
-
        ret
-.LFE2:
-       .size   asmb, .-asmb
-       .section        .eh_frame,"a",@progbits
-.Lframe1:
-       .long   .LECIE1-.LSCIE1
-.LSCIE1:
-       .long   0x0
-       .byte   0x1
-       .string "zR"
-       .uleb128 0x1
-       .sleb128 -8
-       .byte   0x10
-       .uleb128 0x1
-       .byte   0x3
-       .byte   0xc
-       .uleb128 0x7
-       .uleb128 0x8
-       .byte   0x90
-       .uleb128 0x1
-       .align 8
-.LECIE1:
-.LSFDE1:
-       .long   .LEFDE1-.LASFDE1
-.LASFDE1:
-       .long   .LASFDE1-.Lframe1
-       .long   .LFB2
-       .long   .LFE2-.LFB2
-       .uleb128 0x0
-       .align 8
-.LEFDE1:
-       .ident  "GCC: (Debian 4.3.2-1.1) 4.3.2"
-       .section        .note.GNU-stack,"",@progbits