summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn van Groningen2015-09-17 12:56:06 +0000
committerJohn van Groningen2015-09-17 12:56:06 +0000
commit29bff478ce2daf2ac11b1a62ee8ecf8c242ba890 (patch)
tree614713b7c430065cd882daa98f8752a16b01b81e
parentfix pushLc for Mac OS X 64 (broken by previous commit) (diff)
remove 0r before floating point constants on 64 bit Mac OS X,
because it does not work with the llvm assembler
-rw-r--r--cgawas.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/cgawas.c b/cgawas.c
index cf853fc..1e8794b 100644
--- a/cgawas.c
+++ b/cgawas.c
@@ -294,7 +294,7 @@ static int w_as_data (int n,char *data,int length)
}
c=((unsigned char*)data)[i];
- if (isalnum (c) || c=='_' || c==' '){
+ if (isalnum (c) || c=='_' || c==' ' || c=='.'){
if (!in_string){
if (n!=0)
w_as_newline();
@@ -2755,7 +2755,11 @@ static void w_as_word_instruction (struct instruction *instruction)
w_as_define_internal_data_label (float_constant->float_constant_label_number);
w_as_opcode (intel_directives ? "dq" : ".double");
+# ifdef MACH_O64
+ fprintf (assembly_file,"%.20e",*float_constant->float_constant_r_p);
+# else
fprintf (assembly_file,intel_asm ? "%.20e" : "0r%.20e",*float_constant->float_constant_r_p);
+#endif
w_as_newline();
}
}
@@ -2770,7 +2774,11 @@ static void w_as_word_instruction (struct instruction *instruction)
w_as_define_internal_data_label (label_number);
w_as_opcode (intel_directives ? "dq" : ".double");
+# ifdef MACH_O64
+ fprintf (assembly_file,"%.20e",*r_p);
+# else
fprintf (assembly_file,intel_asm ? "%.20e" : "0r%.20e",*r_p);
+# emdif
w_as_newline();
w_as_to_code_section();