Generate proper DWARF reg num for ARM32 (#57443)
authorAndrii Kurdiumov <kant2002@gmail.com>
Mon, 16 Aug 2021 19:46:26 +0000 (01:46 +0600)
committerGitHub <noreply@github.com>
Mon, 16 Aug 2021 19:46:26 +0000 (12:46 -0700)
commit1bb689444440ea9dac05fb9716aac7abfae4bdf8
tree70b6591c43bcddce4070e82b631a8b1248957de1
parent26b20d0ba3dc9553173372dc0dda03b1fba91258
Generate proper DWARF reg num for ARM32 (#57443)

After introduction of VFP-v3 ARM S0-S31 no longer can be generated using LLVM because  numbering of registers to start from 256 and only D0-D31 are used.
So this change encode S0 as D0, S2 as D1, etc. Also use reg nums for DXX registers.
This change fix generation of CFI codes,
which trigger issue with generation of DWARF using LLVM in NativeAOT
See https://developer.arm.com/documentation/ihi0040/c/?lang=en#dwarf-register-names
See https://github.com/dotnet/runtimelab/issues/1388
src/coreclr/jit/unwind.cpp
src/coreclr/jit/unwindarm.cpp