summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2006-06-19 03:53:41 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2006-06-19 03:53:41 +0000
commit1cf9cdcc9c0728131c778e05fbb720f7e4356111 (patch)
treea1f52603a16a10573507ac081500224656129746
parent3ce2b1a85f5b18cf53b3ccb80cb9018b98be0fc6 (diff)
downloadedk2-1cf9cdcc9c0728131c778e05fbb720f7e4356111.zip
edk2-1cf9cdcc9c0728131c778e05fbb720f7e4356111.tar.gz
edk2-1cf9cdcc9c0728131c778e05fbb720f7e4356111.tar.bz2
Fix a bug of PCD autogen for UINT64:
when generate macro value for a UINT64 type PCD, "ULL" should be added to forbid compiler tread it as UINT32 value. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@555 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--Tools/Source/GenBuild/org/tianocore/build/pcd/entity/UsageInstance.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/Tools/Source/GenBuild/org/tianocore/build/pcd/entity/UsageInstance.java b/Tools/Source/GenBuild/org/tianocore/build/pcd/entity/UsageInstance.java
index 9005a98..1a84396 100644
--- a/Tools/Source/GenBuild/org/tianocore/build/pcd/entity/UsageInstance.java
+++ b/Tools/Source/GenBuild/org/tianocore/build/pcd/entity/UsageInstance.java
@@ -204,6 +204,7 @@ public class UsageInstance {
String guidStringArray[] = null;
String guidString = null;
boolean isByteArray = false;
+ String printDatum = null;
hAutogenStr = "";
cAutogenStr = "";
@@ -224,6 +225,12 @@ public class UsageInstance {
}
}
+ if (parentToken.datumType == Token.DATUM_TYPE.UINT64) {
+ printDatum = this.datum + "ULL";
+ } else {
+ printDatum = this.datum;
+ }
+
switch (modulePcdType) {
case FEATURE_FLAG:
if (isBuildUsedLibrary) {
@@ -236,7 +243,7 @@ public class UsageInstance {
} else {
hAutogenStr += String.format("#define _PCD_VALUE_%s %s\r\n",
parentToken.cName,
- datum.toString());
+ printDatum);
hAutogenStr += String.format("extern const BOOLEAN _gPcd_FixedAtBuild_%s;\r\n",
parentToken.cName);
cAutogenStr += String.format("GLOBAL_REMOVE_IF_UNREFERENCED const BOOLEAN _gPcd_FixedAtBuild_%s = _PCD_VALUE_%s;\r\n",
@@ -260,7 +267,7 @@ public class UsageInstance {
} else {
hAutogenStr += String.format("#define _PCD_VALUE_%s %s\r\n",
parentToken.cName,
- datum.toString());
+ printDatum);
if (isByteArray) {
cAutogenStr += String.format("GLOBAL_REMOVE_IF_UNREFERENCED const UINT8 _gPcd_FixedAtBuild_%s[] = _PCD_VALUE_%s;\r\n",
parentToken.cName,
@@ -298,7 +305,7 @@ public class UsageInstance {
} else {
hAutogenStr += String.format("#define _PCD_VALUE_%s %s\r\n",
parentToken.cName,
- datum.toString());
+ printDatum);
if (isByteArray) {
cAutogenStr += String.format("GLOBAL_REMOVE_IF_UNREFERENCED UINT8 _gPcd_BinaryPatch_%s[] = _PCD_VALUE_%s;\r\n",
parentToken.cName,