diff options
author | John van Groningen | 2015-09-17 12:56:06 +0000 |
---|---|---|
committer | John van Groningen | 2015-09-17 12:56:06 +0000 |
commit | 29bff478ce2daf2ac11b1a62ee8ecf8c242ba890 (patch) | |
tree | 614713b7c430065cd882daa98f8752a16b01b81e | |
parent | fix 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.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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(); |