[llvm-commits] CVS: llvm/lib/VMCore/Function.cpp Verifier.cpp
John Criswell
criswell at cs.uiuc.edu
Wed Apr 14 08:48:04 PDT 2004
Changes in directory llvm/lib/VMCore:
Function.cpp updated: 1.67 -> 1.68
Verifier.cpp updated: 1.92 -> 1.93
---
Log message:
Finish adding the llvm.readio and llvm.writeio intrinsics.
Sorry these didn't get in yesterday.
---
Diffs of the changes: (+24 -0)
Index: llvm/lib/VMCore/Function.cpp
diff -u llvm/lib/VMCore/Function.cpp:1.67 llvm/lib/VMCore/Function.cpp:1.68
--- llvm/lib/VMCore/Function.cpp:1.67 Thu Apr 8 15:27:38 2004
+++ llvm/lib/VMCore/Function.cpp Wed Apr 14 08:46:52 2004
@@ -228,6 +228,7 @@
case 'r':
if (getName() == "llvm.returnaddress") return Intrinsic::returnaddress;
if (getName() == "llvm.readport") return Intrinsic::readport;
+ if (getName() == "llvm.readio") return Intrinsic::readio;
break;
case 's':
if (getName() == "llvm.setjmp") return Intrinsic::setjmp;
@@ -240,6 +241,7 @@
if (getName() == "llvm.va_start") return Intrinsic::vastart;
case 'w':
if (getName() == "llvm.writeport") return Intrinsic::writeport;
+ if (getName() == "llvm.writeio") return Intrinsic::writeio;
break;
}
// The "llvm." namespace is reserved!
Index: llvm/lib/VMCore/Verifier.cpp
diff -u llvm/lib/VMCore/Verifier.cpp:1.92 llvm/lib/VMCore/Verifier.cpp:1.93
--- llvm/lib/VMCore/Verifier.cpp:1.92 Fri Apr 9 14:09:14 2004
+++ llvm/lib/VMCore/Verifier.cpp Wed Apr 14 08:46:52 2004
@@ -618,11 +618,33 @@
NumArgs = 2;
break;
+ case Intrinsic::writeio:
+ Assert1(FT->getNumParams() == 2,
+ "Illegal # arguments for intrinsic function!", IF);
+ Assert1(FT->getParamType(0)->isFirstClassType(),
+ "First argument not a first class type!", IF);
+ Assert1(FT->getParamType(1)->getPrimitiveID() == Type::PointerTyID,
+ "Second argument not a pointer!", IF);
+ NumArgs = 2;
+ break;
+
case Intrinsic::readport:
Assert1(FT->getNumParams() == 1,
"Illegal # arguments for intrinsic function!", IF);
+ Assert1(FT->getReturnType()->isFirstClassType(),
+ "Return type is not a first class type!", IF);
Assert1(FT->getParamType(0)->isUnsigned(),
"First argument not unsigned int!", IF);
+ NumArgs = 1;
+ break;
+
+ case Intrinsic:: readio:
+ Assert1(FT->getNumParams() == 1,
+ "Illegal # arguments for intrinsic function!", IF);
+ Assert1(FT->getReturnType()->isFirstClassType(),
+ "Return type is not a first class type!", IF);
+ Assert1(FT->getParamType(0)->getPrimitiveID() == Type::PointerTyID,
+ "First argument not a pointer!", IF);
NumArgs = 1;
break;
More information about the llvm-commits
mailing list