diff options
-rw-r--r-- | src/import/hwpf/fapi2/include/target_types.H | 5 | ||||
-rwxr-xr-x | src/import/hwpf/fapi2/tools/parseAttributeInfo.pl | 16 |
2 files changed, 18 insertions, 3 deletions
diff --git a/src/import/hwpf/fapi2/include/target_types.H b/src/import/hwpf/fapi2/include/target_types.H index f9aec708a..ecf4f0deb 100644 --- a/src/import/hwpf/fapi2/include/target_types.H +++ b/src/import/hwpf/fapi2/include/target_types.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2017 */ +/* Contributors Listed Below - COPYRIGHT 2015,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -253,12 +253,15 @@ enum TargetFilter : uint64_t }; +// attributeOverride tool requires x86.nfp compile +#ifndef CONTEXT_x86_nfp /// @cond constexpr TargetType operator|(TargetType x, TargetType y) { return static_cast<TargetType>(static_cast<int>(x) | static_cast<int>(y)); } +#endif template<uint64_t V> class bitCount diff --git a/src/import/hwpf/fapi2/tools/parseAttributeInfo.pl b/src/import/hwpf/fapi2/tools/parseAttributeInfo.pl index f645de8f4..915b71370 100755 --- a/src/import/hwpf/fapi2/tools/parseAttributeInfo.pl +++ b/src/import/hwpf/fapi2/tools/parseAttributeInfo.pl @@ -6,7 +6,7 @@ # # OpenPOWER HostBoot Project # -# Contributors Listed Below - COPYRIGHT 2015,2017 +# Contributors Listed Below - COPYRIGHT 2015,2018 # [+] International Business Machines Corp. # # @@ -252,6 +252,7 @@ my %attrSyncData = (); #------------------------------------------------------------------------------- # Print header of getFapiAttrEnumData.C # ------------------------------------------------------------------------------ +print FEFILE "// Created via parseAttributeInfo.pl\n"; print FEFILE "const AttributeEnum g_FapiEnums[] = {\n"; my @attrOverrideEnums = (); @@ -569,7 +570,18 @@ foreach my $argnum ( 0 .. $#ARGV ) $value =~ s/\s+$//; } - push @attrOverrideEnums, "\t{ \"$attr->{id}_$values[0]\", $values[1] },\n"; + # Need to add LL/ULL extensions so this generated file + # will compile in x86.nfp context + my $number = $values[1]; + if ( $attr->{valueType} eq 'uint64' ) + { + $number .= "ULL"; + } + elsif ( $attr->{valueType} eq 'int64' ) + { + $number .= "LL"; + } + push @attrOverrideEnums, "\t{ \"$attr->{id}_$values[0]\", $number },\n"; # Print the attribute enum to attribute_ids.H print AIFILE " ENUM_$attr->{id}_${val}"; |