diff options
author | Adrian Herrera <adrian.herrera@arm.com> | 2019-11-15 11:42:23 +0000 |
---|---|---|
committer | Giacomo Travaglini <giacomo.travaglini@arm.com> | 2019-12-18 14:23:04 +0000 |
commit | c4724cac6b75ae9a9f32715f1acfa2d20dcd6fcc (patch) | |
tree | 1782d1bbbd829e3a9b169499b06a908805950feb /src | |
parent | e4c7ea67b81af4a915868a4f7babc46a53d6194c (diff) | |
download | gem5-c4724cac6b75ae9a9f32715f1acfa2d20dcd6fcc.tar.xz |
arch-arm: Semihosting, fix SYS_FLEN
SYS_FLEN was incorrectly handled as SYS_ISTTY. This patch fixes this
behaviour.
Change-Id: I66e0b97d8b44d2cb78e0b1bb940fd6f4b52c658f
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23752
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/arm/semihosting.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/arch/arm/semihosting.cc b/src/arch/arm/semihosting.cc index e04f4199d..2fe5373b8 100644 --- a/src/arch/arm/semihosting.cc +++ b/src/arch/arm/semihosting.cc @@ -454,11 +454,11 @@ ArmSemihosting::callFLen(ThreadContext *tc, bool aarch64, if (argv[1] > files.size() || !files[argv[1]]) return retError(EBADF); - int64_t ret = files[argv[1]]->isTTY(); + int64_t ret = files[argv[1]]->flen(); if (ret < 0) { return retError(-ret); } else { - return retOK(0); + return retOK(ret); } } |