summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2011-10-19 21:05:53 +0000
committerAndy Polyakov <appro@openssl.org>2011-10-19 21:05:53 +0000
commit552e412abcf7828ef5598302b25812ce3e2cd03f (patch)
treeb9e1f1000bad9fb33d993c58f09f873699ef58b4
parent3ee4d41fe14b90b333bb21e4e724939adbcd1a93 (diff)
fips_canister.c: more cross-compiler platfroms verified.
-rw-r--r--fips/fips_canister.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/fips/fips_canister.c b/fips/fips_canister.c
index 8a3524952e..4f187948a2 100644
--- a/fips/fips_canister.c
+++ b/fips/fips_canister.c
@@ -30,8 +30,10 @@ const void *FIPS_text_end(void);
#if !defined(FIPS_REF_POINT_IS_CROSS_COMPILER_AWARE)
# if (defined(__ANDROID__) && (defined(__arm__) || defined(__arm) || \
defined(__i386__)|| defined(__i386))) || \
- (defined(__vxworks) && (defined(__ppc__) || defined(__ppc))) || \
- (defined(__linux) && defined(__PPC__) && !defined(__PPC64__))
+ (defined(__vxworks) && (defined(__ppc__) || defined(__ppc) || \
+ defined(__mips__)|| defined(__mips))) || \
+ (defined(__linux) && ((defined(__PPC__) && !defined(__PPC64__)) || \
+ defined(__arm__) || defined(__arm)))
# define FIPS_REF_POINT_IS_CROSS_COMPILER_AWARE
# endif
#endif
@@ -166,7 +168,11 @@ static void *instruction_pointer(void)
const void *FIPS_ref_point()
{
#if defined(FIPS_REF_POINT_IS_CROSS_COMPILER_AWARE)
+# if defined(__thumb__) || defined(__thumb)
+ return (void *)((size_t)instruction_pointer&~1);
+# else
return (void *)instruction_pointer;
+# endif
#elif defined(INSTRUCTION_POINTER_IMPLEMENTED)
return instruction_pointer();
/* Below we essentially cover vendor compilers which do not support