Skip to content

Unsupported ARM mrc encodings #20907

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nolange mannequin opened this issue Aug 4, 2014 · 5 comments
Closed

Unsupported ARM mrc encodings #20907

nolange mannequin opened this issue Aug 4, 2014 · 5 comments
Labels
backend:ARM bugzilla Issues migrated from bugzilla

Comments

@nolange
Copy link
Mannequin

nolange mannequin commented Aug 4, 2014

Bugzilla Link 20533
Resolution FIXED
Resolved on Jun 16, 2016 07:47
Version trunk
OS Linux
Blocks #19300
CC @rengolin

Extended Description

The llvm assembler doesnt support some special encodings which exist atleast for Arm9:

mrc p15, 0, r15, c7, c14, 3
mrc p15, 0, r15, c7, c10, 3

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0290g/Babebdcb.html

Tested using Clang 3.5 from the Wheezy repository:
Debian clang version 3.5.0-1~exp1 (trunk) (based on LLVM 3.5.0)

@nolange
Copy link
Mannequin Author

nolange mannequin commented Aug 4, 2014

@nolange
Copy link
Mannequin Author

nolange mannequin commented Aug 4, 2014

Compiler commandline is:
arm-none-eabi-clang++ -fmessage-length=0 -mcpu=arm926ej-s -fstrict-aliasing -fstrict-overflow -Wpointer-arith -std=gnu++11 -Wall -Wstrict-overflow=3 -O0 -g3 -gdwarf-4 -fasynchronous-unwind-tables

some more invalid operands:
MRC P15, 0, R0, C3, c0, 0
MCR P15, 0, R0, C3, c0, 0

unknown token in expression (usefull pseudo op in gas and arm assembler):
ldr r0, =#-0x408

unknown directive:
.sect

@nolange
Copy link
Mannequin Author

nolange mannequin commented Aug 4, 2014

Hexadecimal Numbers seem to be unsupported if they start with 0X (upper case X)
eg.

.skip 0x64
.skip 0X64 /* Error !/
mov r0, #​0x64
mov r0, #​0X64 /
Error !*/

@nolange
Copy link
Mannequin Author

nolange mannequin commented Feb 21, 2015

Hello?

This doesnt seem a big problem to fix

@rengolin
Copy link
Member

A bit late to see this, but most of the problems have been fixed.

  1. MRC/MCR and friends have been implemented
  • Your example uses r15 which is not allowed
  • Clang catches it, GAS doesn't
  1. ldr r0, = has been implemented (will be available in 3.9)
  • With the exception that it doesn't use the # syntax (GAS accepts it, too)

Others, not yet:

  1. The assembler is still case sensitive
  • We may want to fix that... on another bug
  1. .sect doesn't seem to be implemented
  • We may want to fix that... on another bug

Since this bug was originally for MRC/MCR, I'm closing it.

If you want the other two issues looked at, please open one bug each and show what is the case for supporting them, other than "GAS accepts it", as GAS accepts many things that are wrong and we shouldn't just do the same.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 9, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:ARM bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

1 participant