summaryrefslogtreecommitdiff
path: root/zap/source/amd64/math
diff options
context:
space:
mode:
Diffstat (limited to 'zap/source/amd64/math')
-rw-r--r--zap/source/amd64/math/abs.s34
1 files changed, 0 insertions, 34 deletions
diff --git a/zap/source/amd64/math/abs.s b/zap/source/amd64/math/abs.s
deleted file mode 100644
index 178b5a7..0000000
--- a/zap/source/amd64/math/abs.s
+++ /dev/null
@@ -1,34 +0,0 @@
-# Copyright 2022-2023 Gabriel Jensen.
-# This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
-# If a copy of the MPL was not distributed with this file, You can obtain one at <https://mozilla.org/MPL/2.0>.
-
-.intel_syntax noprefix
-
-.globl zap_abs8
-.globl zap_abs01
-.globl zap_abs02
-.globl zap_abs04
-
-zap_abs8:
- mov al,dil
- neg al # zap_i8 ret = -inv; // Invert the copy of the input value. This also tests the sign of the value.
- cmovs ax,di # if (val < 0x0) ret = val; // If it was positive, just return the unmodified input.
- ret # return ret;
-
-zap_abs01:
- mov ax,di
- neg ax
- cmovs ax,di
- ret
-
-zap_abs02:
- mov eax,edi
- neg eax
- cmovs eax,edi
- ret
-
-zap_abs04:
- mov rax,rdi
- neg rax
- cmovs rax,rdi
- ret