[AVR] Fix an issue of writing 16-bit ports
commit2a528760bf20004066effcf8f91fedaabd261903
authorBen Shi <powerman1st@163.com>
Sat, 14 Jan 2023 08:40:43 +0000 (14 16:40 +0800)
committerBen Shi <powerman1st@163.com>
Mon, 17 Apr 2023 07:35:33 +0000 (17 15:35 +0800)
treea0c84a79c7cc9180fda53ab7c8cc8d1360b45a5a
parent82fdd5b5123ee8528267a5bed1c443a30f3f93d7
[AVR] Fix an issue of writing 16-bit ports

For 16-bit ports, the normal devices reqiure writing high byte first
and then low byte. But the XMEGA devices require the reverse order.

Fixes https://github.com/llvm/llvm-project/issues/58395

Reviewed By: aykevl, jacquesguan

Differential Revision: https://reviews.llvm.org/D141752
21 files changed:
llvm/lib/Target/AVR/AVRDevices.td
llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp
llvm/lib/Target/AVR/AVRISelLowering.cpp
llvm/lib/Target/AVR/AVRSubtarget.h
llvm/test/CodeGen/AVR/PR37143.ll
llvm/test/CodeGen/AVR/alloca.ll
llvm/test/CodeGen/AVR/atomics/load16.ll
llvm/test/CodeGen/AVR/atomics/store.ll
llvm/test/CodeGen/AVR/atomics/store16.ll
llvm/test/CodeGen/AVR/call.ll
llvm/test/CodeGen/AVR/dynalloca.ll
llvm/test/CodeGen/AVR/lpmx.ll
llvm/test/CodeGen/AVR/pr43443-ctor-alias.ll
llvm/test/CodeGen/AVR/pseudo/OUTWARr.mir
llvm/test/CodeGen/AVR/pseudo/STDWPtrQRr.mir
llvm/test/CodeGen/AVR/pseudo/STSWKRr.mir
llvm/test/CodeGen/AVR/pseudo/STWPtrRr.mir
llvm/test/CodeGen/AVR/shift32.ll
llvm/test/CodeGen/AVR/store.ll
llvm/test/CodeGen/AVR/struct.ll
llvm/test/CodeGen/AVR/varargs.ll