[llvm] r224682 - ARM: further improve deprecated diagnosis (LDM)

Kristof Beyls kristof.beyls at arm.com
Wed Dec 24 02:44:19 PST 2014



> -----Original Message-----
> From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-
> bounces at cs.uiuc.edu] On Behalf Of Joerg Sonnenberger
> Sent: 23 December 2014 21:13
> To: Saleem Abdulrasool
> Cc: llvm-commits at cs.uiuc.edu
> Subject: Re: [llvm] r224682 - ARM: further improve deprecated diagnosis
> (LDM)
> 
> On Sat, Dec 20, 2014 at 08:25:38PM -0000, Saleem Abdulrasool wrote:
> > Author: compnerd
> > Date: Sat Dec 20 14:25:36 2014
> > New Revision: 224682
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=224682&view=rev
> > Log:
> > ARM: further improve deprecated diagnosis (LDM)
> 
> What is the point of enabling this by default? It breaks building
> existing assembler. Deprecation is also overloaded, is it an performance
> improvement? Are there better instructions that work on all CPUs?
> 
> >   POP:
> >     The SP can only be in the list before ARMv7.
> 
> What happens on ARMv7? CPU burns? Magically misbehaving programs?

The ARMv7-AR ARMARM shows that the use of SP in the register
list operand of a POP instruction makes the instruction "UNPREDICTABLE".

Part of the definition of UNPREDICTABLE states:
"""
Means the behavior cannot be relied upon. UNPREDICTABLE behavior must not
perform any function that cannot be
performed at the current or lower level of privilege using instructions that
are not UNPREDICTABLE.
"""

So, yes, magically misbehaving programs is a possible outcome of using
UNPREDICTABLE instructions.

I think that producing an error when assembling unpredictable instructions
is a good thing for the assembler to do.

Thanks,

Kristof







More information about the llvm-commits mailing list