Mercurial > hg > graal-jvmci-8
comparison src/share/vm/adlc/formssel.cpp @ 3965:ae839d1e7d4c
7096010: c2: running with +PrintOptoAssembly crashes the VM when $constanttablebase is used
Summary: ADLC generates code to prepare the register string to be printed in a char array but then calls print without the char array as an argument.
Reviewed-by: never
author | roland |
---|---|
date | Fri, 30 Sep 2011 13:47:26 +0200 |
parents | 1af104d6cf99 |
children | f03a3c8bd5e5 |
comparison
equal
deleted
inserted
replaced
3964:dc45ae774613 | 3965:ae839d1e7d4c |
---|---|
1223 // Generate the format call for the replacement variable | 1223 // Generate the format call for the replacement variable |
1224 void InstructForm::rep_var_format(FILE *fp, const char *rep_var) { | 1224 void InstructForm::rep_var_format(FILE *fp, const char *rep_var) { |
1225 // Handle special constant table variables. | 1225 // Handle special constant table variables. |
1226 if (strcmp(rep_var, "constanttablebase") == 0) { | 1226 if (strcmp(rep_var, "constanttablebase") == 0) { |
1227 fprintf(fp, "char reg[128]; ra->dump_register(in(mach_constant_base_node_input()), reg);\n"); | 1227 fprintf(fp, "char reg[128]; ra->dump_register(in(mach_constant_base_node_input()), reg);\n"); |
1228 fprintf(fp, "st->print(\"%%s\");\n"); | 1228 fprintf(fp, " st->print(\"%%s\", reg);\n"); |
1229 return; | 1229 return; |
1230 } | 1230 } |
1231 if (strcmp(rep_var, "constantoffset") == 0) { | 1231 if (strcmp(rep_var, "constantoffset") == 0) { |
1232 fprintf(fp, "st->print(\"#%%d\", constant_offset());\n"); | 1232 fprintf(fp, "st->print(\"#%%d\", constant_offset());\n"); |
1233 return; | 1233 return; |