[PATCH] D116849: [M68k][GlobalISel] Fix a big-endian-related bug in CallLowering
Sheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 7 17:50:19 PST 2022
0x59616e created this revision.
Herald added subscribers: hiraditya, rovka.
0x59616e requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
When dealing with i64 data in function call, such as
incoming argument, return value, passing argument to another
function, GlobalISel splits i64 into 2 i32 in little endian
order. We need to reverse the order since M68k is big endian.
This patch hacks on this by defining our own ValueAssigner.
When spliting arguments, we cache the results. After
the work is done, we store the results back in reverse order.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D116849
Files:
llvm/lib/Target/M68k/GISel/M68kCallLowering.cpp
llvm/lib/Target/M68k/GISel/M68kCallLowering.h
llvm/test/CodeGen/M68k/GlobalISel/c-call.ll
llvm/test/CodeGen/M68k/GlobalISel/irtranslator-ret.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116849.398283.patch
Type: text/x-patch
Size: 8145 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220108/47461605/attachment.bin>
More information about the llvm-commits
mailing list