HI Olivier,

The patch looks good. Thanks.
Reviewed-by: Yingke Liu <[email protected]>

Best Regards,
Dennis

From: Olivier Martin [mailto:[email protected]]
Sent: Friday, November 29, 2013 6:09 AM
To: [email protected]
Cc: [email protected]; linaro-uefi-internal
Subject: [edk2-buildtools] [PATCH] Removing unrecognized 'ULL' from assembly 
files

Dear BaseTools maintainers,

Please find the patch below that remove the 'ULL' from the assembly source code.
These characters might be introduced when using 64bit Fixed Pcd into assembly 
code.

Example (ARM assembly code):
                #include <Autogen.h>

ldr r1, =FixedPcdGet64 (PcdSystemMemoryBase)

In Autogen.h:

#define _PCD_TOKEN_PcdSystemMemoryBase  37U
#define _PCD_VALUE_PcdSystemMemoryBase  0x80000000ULL
extern const  UINT64  _gPcd_FixedAtBuild_PcdSystemMemoryBase;
#define _PCD_GET_MODE_64_PcdSystemMemoryBase  
_gPcd_FixedAtBuild_PcdSystemMemoryBase
//#define _PCD_SET_MODE_64_PcdSystemMemoryBase  ASSERT(FALSE)  // It is not 
allowed to set value for a FIXED_AT_BUILD PCD

After preprocessing the assembly file with $(PP):
ldr r1, =0x80000000ULL

The compiler will return the error:
                ModuleEntryPoint.iii:53: Error: garbage following instruction 
-- `ldr r1,=0x80000000ULL'

--- a/BaseTools/Conf/build_rule.template
+++ b/BaseTools/Conf/build_rule.template
@@ -166,7 +166,7 @@

     <Command.GCC, Command.RVCT>
         "$(PP)" $(PP_FLAGS) $(INC) ${src} > ${d_path}(+)${s_base}.i
-        Trim --source-code -o ${d_path}(+)${s_base}.iii ${d_path}(+)${s_base}.i
+        Trim --trim-long --source-code -o ${d_path}(+)${s_base}.iii 
${d_path}(+)${s_base}.i
         # For RVCTCYGWIN ASM_FLAGS must be first to work around pathing issues
         "$(ASM)" $(ASM_FLAGS) -o ${dst} $(INC) ${d_path}(+)${s_base}.iii

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin 
[email protected]<mailto:[email protected]>

Regards,
Olivier
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
edk2-buildtools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-buildtools-devel

Reply via email to