aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/powerpc64
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2017-08-25 14:55:22 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2017-08-25 14:55:22 +0200
commit4affb2b02e486681b39add0dbaf4f873a91885c8 (patch)
tree06b045ee98934b00c341071758c9b905ecad057f /runtime/powerpc64
parent95ed4ea7df3e4b05d623afb9cb65f0eb2653361b (diff)
downloadcompcert-kvx-4affb2b02e486681b39add0dbaf4f873a91885c8.tar.gz
compcert-kvx-4affb2b02e486681b39add0dbaf4f873a91885c8.zip
Prefixed runtime functions.
The runtime functions are prefixed with compcert in order to avoid potential clashes with runtime/builtin functions of other compilers. Bug 22062
Diffstat (limited to 'runtime/powerpc64')
-rw-r--r--runtime/powerpc64/i64_dtou.s8
-rw-r--r--runtime/powerpc64/i64_stof.s8
-rw-r--r--runtime/powerpc64/i64_utod.s8
-rw-r--r--runtime/powerpc64/i64_utof.s10
4 files changed, 17 insertions, 17 deletions
diff --git a/runtime/powerpc64/i64_dtou.s b/runtime/powerpc64/i64_dtou.s
index 60d5c9bf..e58bcfaf 100644
--- a/runtime/powerpc64/i64_dtou.s
+++ b/runtime/powerpc64/i64_dtou.s
@@ -39,8 +39,8 @@
### Conversion from double float to unsigned long
.balign 16
- .globl __i64_dtou
-__i64_dtou:
+ .globl __compcert_i64_dtou
+__compcert_i64_dtou:
lis r0, 0x5f00 # 0x5f00_0000 = 2^63 in binary32 format
stwu r0, -16(r1)
lfs f2, 0(r1) # f2 = 2^63
@@ -60,7 +60,7 @@ __i64_dtou:
addis r3, r3, 0x8000 # shift result up by 2^63
addi r1, r1, 16
blr
- .type __i64_dtou, @function
- .size __i64_dtou, .-__i64_dtou
+ .type __compcert_i64_dtou, @function
+ .size __compcert_i64_dtou, .-__compcert_i64_dtou
diff --git a/runtime/powerpc64/i64_stof.s b/runtime/powerpc64/i64_stof.s
index 8830d594..779cbc18 100644
--- a/runtime/powerpc64/i64_stof.s
+++ b/runtime/powerpc64/i64_stof.s
@@ -39,8 +39,8 @@
### Conversion from signed long to single float
.balign 16
- .globl __i64_stof
-__i64_stof:
+ .globl __compcert_i64_stof
+__compcert_i64_stof:
rldimi r4, r3, 32, 0 # reassemble (r3,r4) as a 64-bit integer in r4
# Check whether -2^53 <= X < 2^53
sradi r5, r4, 53
@@ -63,6 +63,6 @@ __i64_stof:
frsp f1, f1
addi r1, r1, 16
blr
- .type __i64_stof, @function
- .size __i64_stof, .-__i64_stof
+ .type __compcert_i64_stof, @function
+ .size __compcert_i64_stof, .-__compcert_i64_stof
diff --git a/runtime/powerpc64/i64_utod.s b/runtime/powerpc64/i64_utod.s
index ddde91dd..491ee26b 100644
--- a/runtime/powerpc64/i64_utod.s
+++ b/runtime/powerpc64/i64_utod.s
@@ -39,8 +39,8 @@
### Conversion from unsigned long to double float
.balign 16
- .globl __i64_utod
-__i64_utod:
+ .globl __compcert_i64_utod
+__compcert_i64_utod:
rldicl r3, r3, 0, 32 # clear top 32 bits
rldicl r4, r4, 0, 32 # clear top 32 bits
lis r5, 0x4f80 # 0x4f80_0000 = 2^32 in binary32 format
@@ -55,8 +55,8 @@ __i64_utod:
fmadd f1, f1, f3, f2 # compute hi * 2^32 + lo
addi r1, r1, 32
blr
- .type __i64_utod, @function
- .size __i64_utod, .-__i64_utod
+ .type __compcert_i64_utod, @function
+ .size __compcert_i64_utod, .-__compcert_i64_utod
# Alternate implementation using round-to-odd:
# rldimi r4, r3, 32, 0 # reassemble (r3,r4) as a 64-bit integer in r4
diff --git a/runtime/powerpc64/i64_utof.s b/runtime/powerpc64/i64_utof.s
index 2617cbda..cdb2f867 100644
--- a/runtime/powerpc64/i64_utof.s
+++ b/runtime/powerpc64/i64_utof.s
@@ -39,8 +39,8 @@
### Conversion from unsigned long to single float
.balign 16
- .globl __i64_utof
-__i64_utof:
+ .globl __compcert_i64_utof
+__compcert_i64_utof:
mflr r9
# Check whether X < 2^53
andis. r0, r3, 0xFFE0 # test bits 53...63 of X
@@ -55,10 +55,10 @@ __i64_utof:
or r4, r4, r0 # correct bit number 12 of X
rlwinm r4, r4, 0, 0, 20 # set to 0 bits 0 to 11 of X
# Convert to double, then round to single
-1: bl __i64_utod
+1: bl __compcert_i64_utod
mtlr r9
frsp f1, f1
blr
- .type __i64_utof, @function
- .size __i64_utof, .-__i64_utof
+ .type __compcert_i64_utof, @function
+ .size __compcert_i64_utof, .-__compcert_i64_utof