summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-upgrade/UpgradeParser.y.cvs
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-12-07 04:23:03 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-12-07 04:23:03 +0000
commit7485a167a76cc86db92241dc517b27753ffe05b5 (patch)
treeee876939fc2bb45c77d01ced5452c450e6c358d2 /llvm/tools/llvm-upgrade/UpgradeParser.y.cvs
parentfc9ca55b6a4a7afb4281ee8da52209e3655b9e50 (diff)
downloadbcm5719-llvm-7485a167a76cc86db92241dc517b27753ffe05b5.tar.gz
bcm5719-llvm-7485a167a76cc86db92241dc517b27753ffe05b5.zip
Regenerate.
llvm-svn: 32303
Diffstat (limited to 'llvm/tools/llvm-upgrade/UpgradeParser.y.cvs')
-rw-r--r--llvm/tools/llvm-upgrade/UpgradeParser.y.cvs13
1 files changed, 11 insertions, 2 deletions
diff --git a/llvm/tools/llvm-upgrade/UpgradeParser.y.cvs b/llvm/tools/llvm-upgrade/UpgradeParser.y.cvs
index 1b315acc22a..f53369d6031 100644
--- a/llvm/tools/llvm-upgrade/UpgradeParser.y.cvs
+++ b/llvm/tools/llvm-upgrade/UpgradeParser.y.cvs
@@ -24,6 +24,7 @@
#define YYINCLUDED_STDLIB_H
#define YYDEBUG 1
#define UPGRADE_SETCOND_OPS 0
+#define GENERATE_FCMP_INSTS 0
int yylex(); // declaration" of xxx warnings.
int yyparse();
@@ -247,8 +248,16 @@ getCompareOp(const std::string& setcc, const TypeInfo& TI) {
result[6] = cc1;
result[7] = cc2;
if (TI.isFloatingPoint()) {
+#if GENERATE_FCMP_INSTS
result[0] = 'f';
result[5] = 'o'; // FIXME: Always map to ordered comparison ?
+ if (cc1 == 'n')
+ result[5] = 'u'; // NE maps to unordered
+ else
+ result[5] = 'o'; // everything else maps to ordered
+#else
+ result = setcc;
+#endif
} else if (TI.isIntegral() || TI.isPointer()) {
result[0] = 'i';
if ((cc1 == 'e' && cc2 == 'q') || (cc1 == 'n' && cc2 == 'e'))
@@ -265,7 +274,7 @@ getCompareOp(const std::string& setcc, const TypeInfo& TI) {
%}
-%file-prefix="UpgradeParser"
+// %file-prefix="UpgradeParser"
%union {
std::string* String;
@@ -382,7 +391,7 @@ OptCallingConv
OptAlign
: /*empty*/ { $$ = new std::string(); }
| ALIGN EUINT64VAL { *$1 += " " + *$2; delete $2; $$ = $1; };
- ;
+
OptCAlign
: /*empty*/ { $$ = new std::string(); }
| ',' ALIGN EUINT64VAL {
OpenPOWER on IntegriCloud