Skip to content

Commit 0e3d54d

Browse files
committed
redo assembly (still works)
1 parent c1a7a05 commit 0e3d54d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
*.so
55
*.dylib
66
tree/tree
7+
tst/*
78

89
# Test binary, build with `go test -c`
910
*.test
10-
tst
1111

1212
# save data
1313
*.gob

tree/oit_amd64.s

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ TEXT ·oneIfTrue(SB),NOSPLIT,$0
77
MOVSS x+0(FP), X0 // put first arg in a register
88
MOVSS y+4(FP), X1 // put second arg in a register
99
UCOMISS X0, X1
10-
JNE NOTEQ // when not equal return 0
11-
MOVQ $0x3f800000, ret+8(FP) // when equal return 0
10+
JE REONE // jump if equal
11+
MOVQ $0x00000000, ret+8(FP) // return 0 when not equal
1212
RET
13-
NOTEQ:
14-
MOVQ $0x00000000, ret+8(FP) // move 0 to the return value
13+
REONE:
14+
MOVQ $0x3f800000, ret+8(FP) // move 1 to return
1515
RET

0 commit comments

Comments
 (0)