target/mips: Simplify UHI_argnlen and UHI_argn
commit3bb45bbc6fa59f35ab42e39ea4f4bcf67fea8d5f
authorRichard Henderson <richard.henderson@linaro.org>
Tue, 28 Jun 2022 11:17:00 +0000 (28 16:47 +0530)
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>
Tue, 12 Jul 2022 20:32:18 +0000 (12 22:32 +0200)
tree5ae3e65b04084b658f3586847c4fdc0f62b976a5
parent938fcd741ad656b2c4aeb1654bfc4ff221c26bbf
target/mips: Simplify UHI_argnlen and UHI_argn

With semihosting_get_arg, we already have a check vs argc, so
there's no point replicating it -- just check the result vs NULL.
Merge copy_argn_to_target into its caller.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20220628111701.677216-8-richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
target/mips/tcg/sysemu/mips-semi.c