truss: fix handling of 64-bit arguments/return values for compat32
authorAlex Richardson <arichardson@FreeBSD.org>
Wed, 16 Jun 2021 15:29:57 +0000 (16:29 +0100)
committerAlex Richardson <arichardson@FreeBSD.org>
Wed, 16 Jun 2021 15:29:57 +0000 (16:29 +0100)
commit8ba2e89e987c7ae171c5f099e59d599294d626b7
treeb60e618f1f0b35f9e992a2df8593a3d46bee3af6
parent1a3a57d74590bb44e96629aec35897b475bd69fa
truss: fix handling of 64-bit arguments/return values for compat32

Deciding whether to combine two values to a 64-bit one should be based on
the process ABI, and not dependent on whether truss is compiled for an
LP64 ABI. This is a follow-up cleanup for D27625. I found this while
looking for uses of the `__LP64__` macro (since using this is wrong for
CHERI systems).

Test Plan: truss still works. Since I tested on AMD64 and all syscalls
in the trace have their quad argument last there was no difference
in the output. Should fix output for compat32 on MIPS64 though.

Reviewed By: jhb
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D27637
usr.bin/truss/syscalls.c