OSDN Git Service

tcg/mips: Support unaligned access for user-only
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 6 Aug 2021 15:49:16 +0000 (05:49 -1000)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 8 Feb 2022 21:55:02 +0000 (08:55 +1100)
commit23a79c113ed2ae693d882d109862f4a759fbf10e
tree49f53b9a023cfc76b63e833ab8725b6db5e209cc
parent0c90fa5dce29243c06841d7b07ff2bd97c27c1f4
tcg/mips: Support unaligned access for user-only

This is kinda sorta the opposite of the other tcg hosts, where
we get (normal) alignment checks for free with host SIGBUS and
need to add code to support unaligned accesses.

Fortunately, the ISA contains pairs of instructions that are
used to implement unaligned memory accesses.  Use them.

Tested-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
tcg/mips/tcg-target.c.inc
tcg/mips/tcg-target.h