[PATCH] D63863: [ARM] Make coprocessor number restrictions consistent.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 16 23:18:09 PDT 2019


MaskRay added a comment.

This change made coprocessor numbers other than 14/15 invalid for ARMv8, and thus some instructions can't be assembled.

  % cat a.s
  ldc     p2, c4, [r12], #48
  % llvm-mc -filetype=null -triple armv7-linux-musleabi a.s
  # ok
  % llvm-mc -filetype=null -triple armv8-linux-musleabi a.s
          .text
  a.s:1:5: error: invalid operand for instruction
  ldc p2, cr4, [ip], #48
      ^

Such instructions are used by musl guarded by an AT_HWCAP test.

  // musl/src/setjmp/arm/longjmp.s
  	tst r1,#0x20
  	beq 2f
  	ldc p2, cr4, [ip], #48
  2:	tst r1,#0x40
  
  .hidden __hwcap
  .align 2
  1:	.word __hwcap-1b

The consequence is that musl can't be built with `clang-9 -target armv8-linux-musleabihf`.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63863/new/

https://reviews.llvm.org/D63863





More information about the llvm-commits mailing list