constraint "w" produces access to single precission registers

Bug #1856486 reported by Peter Hintenaus
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Arm Embedded Toolchain
Incomplete
Undecided
Przemyslaw Wirkus

Bug Description

when using the following inline assembly

__attribute__((always_inline))
static inline double _VSQRT(double op){
   double res;
   asm volatile("vsqrt.f64 %[result], %[value]" : [result] "=w"(res) : [value]"w"(op));
   return res;
}

the assembler complains
Error: VFP single or double precision register expected -- `vsqrt.f64 f14,f14'

The single precision version (using constraint "t") works.

I'm using
GNU Tools for Arm Embedded Processors 9-2019q4-major Release
as provided by ARM.

Thank you,
Peter Hintenaus

Revision history for this message
Joey Ye (jinyun-ye) wrote :

Can you please provide the command line option?

Changed in gcc-arm-embedded:
status: New → Incomplete
assignee: nobody → Przemyslaw Wirkus (wirkus)
Revision history for this message
Peter Hintenaus (phintena) wrote : Re: [Bug 1856486] Re: constraint "w" produces access to single precission registers

Hi,

this is out of a build log:

arm-none-eabi-gcc -I./ -c -fno-common -O3 -mcpu=cortex-m7 -mthumb -g
-DHSE_CLK=16000000UL -DEXTERNAL_OSCILLATOR -mthumb-interwork -DSAMV7
-DCORE=SAMV7 -DVER_MAJOR=0 -DVER_MINOR=1 -DVER_MONTH=2 -DVER_SVN=0
-DVER_BUILD=28 -DVER_YEAR=2020 -DDEVICEID=0x0AF08C -mfloat-abi=hard
-mfpu=fpv5-d16 -D__SAME70N20__ -DDONT_USE_CMSIS_INIT -DCL_VERSION=2
-I../../../Library -I../../../Library/SAMV7
-I../../../Library/SAMV7/libchip -I../../../Library/SAMV7/libchip/cmsis
-I.//CAN -I.//HAL -I.//SAM -I.//CONFIG -M -c CAN/hpl_mcan.c main.c -E >>
.depend

hope this helps,

Peter

On 2/28/20 11:25 AM, Joey Ye wrote:
> Can you please provide the command line option?
>
> ** Changed in: gcc-arm-embedded
> Status: New => Incomplete
>
> ** Changed in: gcc-arm-embedded
> Assignee: (unassigned) => Przemyslaw Wirkus (wirkus)
>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.