Skip to content

Commit

Permalink
examples: adapt to new const types
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcloughlin committed Dec 27, 2018
1 parent abd300c commit 662ae52
Show file tree
Hide file tree
Showing 8 changed files with 1,274 additions and 1,272 deletions.
4 changes: 2 additions & 2 deletions examples/fnv1a/fnv1a.s
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ TEXT ·Hash64(SB),0,$0-32
MOVQ data_base(FP), CX
MOVQ data_len+8(FP), BX
MOVQ $0xcbf29ce484222325, AX
MOVQ $0x100000001b3, BP
MOVQ $0x00000100000001b3, BP
loop:
CMPQ BX, $0x0
CMPQ BX, $0x00
JE done
MOVBQZX (CX), DX
XORQ DX, AX
Expand Down
6 changes: 3 additions & 3 deletions examples/sha1/asm.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,17 @@ func main() {
XORL(W(r-8), u)
XORL(W(r-14), u)
XORL(W(r-16), u)
ROLL(Imm(1), u)
ROLL(U8(1), u)
}
MOVL(u, W(r))

// Compute the next state register.
t := GP32v()
MOVL(a, t)
ROLL(Imm(5), t)
ROLL(U8(5), t)
ADDL(q.F(b, c, d), t)
ADDL(e, t)
ADDL(Imm(q.K), t)
ADDL(U32(q.K), t)
ADDL(u, t)

// Update registers.
Expand Down
Loading

0 comments on commit 662ae52

Please sign in to comment.