cproc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/cproc
Log | Files | Refs | Submodules | README | LICENSE

commit 083bd95ef10c480fd234ec25933da27b2fa3fda9
parent 50aeef05f9f8fdb2e56ddc201b1ae7a8d56e3233
Author: Andrew Chambers <andrewchambers@fastmail.com>
Date:   Wed, 27 Feb 2019 14:15:30 +1300

Don't add zero offsets when zeroing.

Diffstat:
Mqbe.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qbe.c b/qbe.c @@ -865,7 +865,7 @@ zero(struct function *func, struct value *addr, int align, uint64_t offset, uint while (offset < end) { if ((align - (offset & align - 1)) & a) { - tmp = funcinst(func, IADD, &iptr, (struct value *[]){addr, mkintconst(&iptr, offset)}); + tmp = offset ? funcinst(func, IADD, &iptr, (struct value *[]){addr, mkintconst(&iptr, offset)}) : addr; funcinst(func, store[a], NULL, (struct value *[]){&z, tmp}); offset += a; }