This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

System Register (S3_3_C2_C4_0) Compilation Error

Dear ARM expert,

I am working on a UEFI FMP Driver.
It's my first time building Arm Architecture as a target, and an error occurred at the bottom while using the random number generation library.

sha512.c
: : c:\edk2\edk2\Build\HpFWUpdate\DEBUG_VS2019\AARCH64\CryptoPkg\Library\MbedTlsLib\MbedTlsLib\DEBUG\AutoGen.h
: : c:\edk2\edk2\MdePkg\Include\Base.h
: : c:\edk2\edk2\MdePkg\Include\AArch64\ProcessorBind.h
: : c:\edk2\edk2\cryptopkg\library\mbedtlslib\mbedtls\library\common.h
: : c:\edk2\edk2\CryptoPkg\Library\MbedTlsLib\mbedtls\include\mbedtls/build_info.h
: : c:\edk2\edk2\CryptoPkg\Library\MbedTlsLib\Include\mbedtls/mbedtls_config.h
: : c:\edk2\edk2\CryptoPkg\Library\Include\stddef.h
c:\edk2\edk2\Build\HpFWUpdate\DEBUG_VS2019\AARCH64\MdePkg\Library\BaseRngLib\BaseRngLib\OUTPUT\AArch64\ArmRng.iiii(35) : error A2502: operand 2: Expected constant
mrs x1, S3_3_C2_C4_0
c:\edk2\edk2\Build\HpFWUpdate\DEBUG_VS2019\AARCH64\MdePkg\Library\BaseRngLib\BaseRngLib\OUTPUT\AArch64\ArmRng.iiii(39) : error A2506: operand 2: Not enough operands
cset x0, ne
: : c:\edk2\edk2\CryptoPkg\Library\Include\CrtLibSupport.h
: : c:\edk2\edk2\MdePkg\Include\Library/BaseLib.h

"S3_3_C2_C4_0" looks like a system register, how can I make it recognize this?

Now. I'm using MSVC v142 arm64 compiler and Clang and LLVM are using SDLLVM (Ver 14.0.1).