================
@@ -2263,6 +2263,49 @@ int foo() {
}
```
+### String literal encoding in ASM statements
+
+On targets where the platform's default ordinary literal encoding differs from
+UTF-8 (such as z/OS, where the system default encoding is IBM-1047):
+
+* **String literals**: A string literal used as the template string in an
+ extended asm statement, as the instruction string in a basic asm statement,
+ or as the string specifying the assembler name or register in an asm label or
+ a global/local register variable declaration (such as `asm("...")` or
+ `__asm__("...")`) is parsed and interpreted using the target system's default
+ encoding (such as IBM-1047 on z/OS) rather than the literal encoding
+ specified by `-fexec-charset=`. This ensures that escape sequences (such as
+ octal or hexadecimal byte escapes) are interpreted as system/assembler code
+ points.
+
+* **Constexpr string expressions in ASM statements**: When a parenthesized
+ constant expression is provided in place of an `asm` string, string literals
+ within that constant expression are encoded according to the execution
+ character set specified by `-fexec-charset=` (the literal encoding), as
+ constant expression evaluation expects `char` sequences to operate in the
+ literal encoding.
----------------
abhina-sree wrote:
This is done, thanks!
https://github.com/llvm/llvm-project/pull/169803
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits