Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • P pixman
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 36
    • Issues 36
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 19
    • Merge requests 19
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Pixman
  • pixman
  • Issues
  • #46
Closed
Open
Issue created Apr 20, 2021 by Jian Cai@jcai19

Building pixman with LLVM's integrated assembler

While trying to build pixman with LLVM's integrated assembler on Chrome OS, I had to rewrite subpls into subspl in ARM assembly, as IAS only supported unified syntax. This caused GNU assembler to fail unless ".syntax unified" is used (http://crbug.com/1184997). However, with that specified, GAS failed to assemble some assembly files due to missing leading backslash in macro argument evaluation (https://sourceware.org/binutils/docs/as/Macro.html#Macro). For example, GAS cannot assemble the assembling code.

$ cat bar.s 
.syntax divided
.macro bar arg1
mov r2, #arg1
.endm
bar 88
$ arm-linux-gnueabihf-as -march=armv7-a bar.s -o gas.o
bar.s: Assembler messages:
bar.s:5: Error: undefined symbol arg1 used as an immediate value

This can be fixed by rewriting bar.s into

$ cat bar.s 
.syntax divided
.macro bar arg1
mov r2, #\arg1
.endm
bar 88
$ arm-linux-gnueabihf-as -march=armv7-a bar.s -o gas.o
$ arm-linux-gnueabihf-objdump -march=armv7-a -d gas.o

gas.o:     file format elf32-littlearm


Disassembly of section .text:

00000000 <.text>:
   0:	e3a02058 	mov	r2, #88	; 0x58

To rewrite ARM assembly in pixman with unified syntax would require a large patch as this issue is prevailing in the code. I explored it a little bit, and so far I've made a patch with hundreds of lines, with unknown number of instances left to fix. Before I invest more time and try to fix remaining build failures, I would like to know if such a patch would be acceptable, or if there is a better way to fix this issue? Thanks.

Assignee
Assign to
Time tracking