6754519: don't emit flag fixup for NaN when condition being tested doesn't need it

Reviewed-by: kvn, rasbold
This commit is contained in:
Tom Rodriguez 2008-10-28 09:31:30 -07:00
parent f3a403d0d4
commit 429a95440a
16 changed files with 1125 additions and 253 deletions

View file

@ -1574,10 +1574,10 @@ Opcode::opcode_type Opcode::as_opcode_type(const char *param) {
return Opcode::NOT_AN_OPCODE;
}
void Opcode::print_opcode(FILE *fp, Opcode::opcode_type desired_opcode) {
bool Opcode::print_opcode(FILE *fp, Opcode::opcode_type desired_opcode) {
// Default values previously provided by MachNode::primary()...
const char *description = "default_opcode()";
const char *value = "-1";
const char *description = NULL;
const char *value = NULL;
// Check if user provided any opcode definitions
if( this != NULL ) {
// Update 'value' if user provided a definition in the instruction
@ -1599,7 +1599,10 @@ void Opcode::print_opcode(FILE *fp, Opcode::opcode_type desired_opcode) {
break;
}
}
fprintf(fp, "(%s /*%s*/)", value, description);
if (value != NULL) {
fprintf(fp, "(%s /*%s*/)", value, description);
}
return value != NULL;
}
void Opcode::dump() {
@ -2610,14 +2613,19 @@ void MemInterface::output(FILE *fp) {
}
//------------------------------CondInterface----------------------------------
CondInterface::CondInterface(char *equal, char *not_equal,
char *less, char *greater_equal,
char *less_equal, char *greater)
CondInterface::CondInterface(const char* equal, const char* equal_format,
const char* not_equal, const char* not_equal_format,
const char* less, const char* less_format,
const char* greater_equal, const char* greater_equal_format,
const char* less_equal, const char* less_equal_format,
const char* greater, const char* greater_format)
: Interface("COND_INTER"),
_equal(equal), _not_equal(not_equal),
_less(less), _greater_equal(greater_equal),
_less_equal(less_equal), _greater(greater) {
//
_equal(equal), _equal_format(equal_format),
_not_equal(not_equal), _not_equal_format(not_equal_format),
_less(less), _less_format(less_format),
_greater_equal(greater_equal), _greater_equal_format(greater_equal_format),
_less_equal(less_equal), _less_equal_format(less_equal_format),
_greater(greater), _greater_format(greater_format) {
}
CondInterface::~CondInterface() {
// not owner of any character arrays