[all-commits] [llvm/llvm-project] b24acc: [Flang][LoongArch] Add sign extension for i32 argu...

Zhaoxin Yang via All-commits all-commits at lists.llvm.org
Tue Nov 19 03:58:43 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b24acc06e1d465b3e3e4e28515dd437f6a7454f2
      https://github.com/llvm/llvm-project/commit/b24acc06e1d465b3e3e4e28515dd437f6a7454f2
  Author: Zhaoxin Yang <yangzhaoxin at loongson.cn>
  Date:   2024-11-19 (Tue, 19 Nov 2024)

  Changed paths:
    M flang/lib/Optimizer/CodeGen/Target.cpp
    A flang/test/Fir/target-rewrite-integer-loongarch64.fir

  Log Message:
  -----------
  [Flang][LoongArch] Add sign extension for i32 arguments and returns in function signatures. (#116146)

In loongarch64 LP64D ABI, `unsigned 32-bit` types, such as unsigned int,
are stored in general-purpose registers as proper sign extensions of
their 32-bit values. Therefore, Flang also follows it if a function
needs to be interoperable with C.

Reference:

https://github.com/loongson/la-abi-specs/blob/release/lapcs.adoc#Fundamental-types



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list