Currently, the regular expression that matches the lines of assembly for PPC LE (ELFv2) does not work for the assembly for BE (ELFv1). This patch fixes it. Keep in mind that I really don't know Python, so this may not be the way we want to fix it, but it gets the job done on the simple input I used it on.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Thanks for your comments @MaskRay. Let me know if you think that RE would work.
utils/UpdateTestChecks/asm.py | ||
---|---|---|
53 | To be honest with you, this regular expression syntax is mostly gibberish to me. From what I was able to decipher, the first line looks for function_name: # @function_name which appears in PPC asm syntax. Then for LE, the following line is .Lfunc_beginN: whereas for BE, there are a few more lines with .p2align, .quad, .text. | |
245 | OK. |
utils/UpdateTestChecks/asm.py | ||
---|---|---|
53 | Yeah if .p2align .quad .text are not that important, maybe a catch-all .* is better.. |
Updated the regular expression to just eat any text that is not relevant between the function directive and its text. This seems to work for both ELFv1 and ELFv2 asm output.
Can this be merged with ASM_FUNCTION_PPC_RE? If not, is it possible to extract the common part to a variable ASM_FUNCTION_PPC_COMMON (you make give it a better name)?