projects
/
uebersetzerbau-ss10.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
asmb: 'bessere' testfaelle
[uebersetzerbau-ss10.git]
/
asmb
/
asmb.s
diff --git
a/asmb/asmb.s
b/asmb/asmb.s
index b7afd1ce4acc82d5f7c789567e1a06fe0aa16cde..8fb92b199a473241013aeb4388f95ef5258e55e3 100644
(file)
--- a/
asmb/asmb.s
+++ b/
asmb/asmb.s
@@
-13,20
+13,22
@@
constc0:
.rept 16
.byte 0xc0
.endr
.rept 16
.byte 0xc0
.endr
+const00:
+ .rept 16
+ .byte 0x00
+ .endr
.text
.globl asmb
.type asmb, @function
asmb:
.LFB2:
.text
.globl asmb
.type asmb, @function
asmb:
.LFB2:
- xor %rdx, %rdx
-
- //soll einfach null sein
- pxor %xmm14, %xmm14
+ //speicheradresse des parameters zurueckgeben
+ mov %rdi, %rax
.nextround:
//speicheradresse des pointers zeigt auf 16*8 feld = 128bit
.nextround:
//speicheradresse des pointers zeigt auf 16*8 feld = 128bit
- movdqu (%rdi
, %rdx, 8
), %xmm11
+ movdqu (%rdi), %xmm11
// -64 - c
movdqa constc0, %xmm9
// -64 - c
movdqa constc0, %xmm9
@@
-39,26
+41,23
@@
asmb:
.differenz:
// Y = min(X, 'a' - 'A')
.differenz:
// Y = min(X, 'a' - 'A')
- p
minub
const20, %xmm9
+ p
and
const20, %xmm9
// c += Y
paddb %xmm9, %xmm11
// retuniere an die richtige speicheradresse
// c += Y
paddb %xmm9, %xmm11
// retuniere an die richtige speicheradresse
- movdqu %xmm11, (%rdi
, %rdx, 8
)
+ movdqu %xmm11, (%rdi)
//entspricht ein byte dem nullbyte dann steht an jener stelle 0xff sonst 0x00
//entspricht ein byte dem nullbyte dann steht an jener stelle 0xff sonst 0x00
- pcmpeqb
%xmm14
, %xmm11
+ pcmpeqb
const00
, %xmm11
//hol die MSBs aller bytes raus
pmovmskb %xmm11, %ecx
//hol die MSBs aller bytes raus
pmovmskb %xmm11, %ecx
- add $
2, %rdx
+ add $
16, %rdi
//ist %ecx gleich null? dann die naechsten 16byte bitte
jecxz .nextround
//ist %ecx gleich null? dann die naechsten 16byte bitte
jecxz .nextround
- //speicheradresse des parameters zurueckgeben (wird noch modifziert)
- mov %rdi, %rax
-
/*
//===============
//ab hier uebler hax um nach \0 trotzdem die gleichen bytes wie
/*
//===============
//ab hier uebler hax um nach \0 trotzdem die gleichen bytes wie
@@
-114,12
+113,12
@@
asmb:
.endshift:
//betreffende speicherstelle in %xmm11 laden
.endshift:
//betreffende speicherstelle in %xmm11 laden
- movdqu -16(%r
ax, %rdx, 8
), %xmm11
+ movdqu -16(%r
di
), %xmm11
//und overhead wieder subtrahieren
psubb %xmm9, %xmm11
//ergebnis zurueckspielen und fertig \o/
//und overhead wieder subtrahieren
psubb %xmm9, %xmm11
//ergebnis zurueckspielen und fertig \o/
- movdqu %xmm11, -16(%r
ax, %rdx, 8
)
+ movdqu %xmm11, -16(%r
di
)
*/
ret
*/
ret