Re: [PATCH v2 05/74] semihosting: Add target_strlen for softmmu-uaccess.h

2022-05-16 Thread Richard Henderson
On 5/16/22 08:11, Peter Maydell wrote: +chunk = -(addr | TARGET_PAGE_MASK); 'chunk' is unsigned but we're assigning it a negative number here... I assume this is doing some clever bit-twiddling trick but it isn't very obvious. Number of bytes left in page -- I'll rename the variable.

Re: [PATCH v2 05/74] semihosting: Add target_strlen for softmmu-uaccess.h

2022-05-16 Thread Peter Maydell
On Tue, 3 May 2022 at 20:57, Richard Henderson wrote: > > Mirror the user-only function of the same name. > > Signed-off-by: Richard Henderson > --- > include/semihosting/softmmu-uaccess.h | 3 +++ > semihosting/uaccess.c | 29 +++ > 2 files changed, 32 i

[PATCH v2 05/74] semihosting: Add target_strlen for softmmu-uaccess.h

2022-05-03 Thread Richard Henderson
Mirror the user-only function of the same name. Signed-off-by: Richard Henderson --- include/semihosting/softmmu-uaccess.h | 3 +++ semihosting/uaccess.c | 29 +++ 2 files changed, 32 insertions(+) diff --git a/include/semihosting/softmmu-uaccess.h b/in