[coreboot-gerrit] Change in coreboot[master]: [NOTFORMERGE] Guard against 64 bit arithmetic on clang
Arthur Heymans (Code Review)
gerrit at coreboot.org
Wed May 17 14:09:25 CEST 2017
Arthur Heymans has uploaded a new change for review. ( https://review.coreboot.org/19737 )
Change subject: [NOTFORMERGE] Guard against 64 bit arithmetic on clang
......................................................................
[NOTFORMERGE] Guard against 64 bit arithmetic on clang
Change-Id: Iccd9da4c60cf6851f56da460b9af30704cc8dbb8
Signed-off-by: Arthur Heymans <arthur at aheymans.xyz>
---
M src/arch/x86/rdrand.c
M src/console/vtxprintf.c
2 files changed, 5 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/37/19737/1
diff --git a/src/arch/x86/rdrand.c b/src/arch/x86/rdrand.c
index dc7ed60..667b82b 100644
--- a/src/arch/x86/rdrand.c
+++ b/src/arch/x86/rdrand.c
@@ -42,6 +42,7 @@
* Generate a 64-bit random number through RDRAND instruction.
* Carry flag is set on RDRAND success and 0 on failure.
*/
+#if !__GNUC__
static inline uint8_t rdrand_64(uint64_t *rand)
{
uint8_t carry;
@@ -51,6 +52,7 @@
: "=a" (*rand), "=qm" (carry));
return carry;
}
+#endif
int get_random_number_32(uint32_t *rand)
{
@@ -64,6 +66,7 @@
return -1;
}
+#if !__GNUC__
int get_random_number_64(uint64_t *rand)
{
int i;
@@ -81,3 +84,4 @@
}
return -1;
}
+#endif
diff --git a/src/console/vtxprintf.c b/src/console/vtxprintf.c
index 5f37253..17ef3a0 100644
--- a/src/console/vtxprintf.c
+++ b/src/console/vtxprintf.c
@@ -21,7 +21,7 @@
#define call_tx(x) tx_byte(x, data)
-#if !CONFIG_ARCH_MIPS
+#if !CONFIG_ARCH_MIPS && !__GNUC__
#define SUPPORT_64BIT_INTS
#endif
--
To view, visit https://review.coreboot.org/19737
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iccd9da4c60cf6851f56da460b9af30704cc8dbb8
Gerrit-PatchSet: 1
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Arthur Heymans <arthur at aheymans.xyz>
More information about the coreboot-gerrit
mailing list