aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/flags_amd64_test.s
blob: 7402f6badb1d8254bd879a4d7e92118860ca2b81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright 2020 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

#include "textflag.h"

TEXT ·asmAddFlags(SB),NOSPLIT,$0-24
	MOVQ	x+0(FP), AX
	ADDQ	y+8(FP), AX
	PUSHFQ
	POPQ	AX
	MOVQ	AX, ret+16(FP)
	RET

TEXT ·asmSubFlags(SB),NOSPLIT,$0-24
	MOVQ	x+0(FP), AX
	SUBQ	y+8(FP), AX
	PUSHFQ
	POPQ	AX
	MOVQ	AX, ret+16(FP)
	RET

TEXT ·asmAndFlags(SB),NOSPLIT,$0-24
	MOVQ	x+0(FP), AX
	ANDQ	y+8(FP), AX
	PUSHFQ
	POPQ	AX
	MOVQ	AX, ret+16(FP)
	RET