From d3e7f472596dfec22cc7ce2eba7b9f997b3a348d Mon Sep 17 00:00:00 2001 From: Kwarde Date: Tue, 24 Jun 2025 15:08:54 +0200 Subject: [PATCH] Store rcx to r11 instead of stack in tolower()/toupper() tests --- tests.asm | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/tests.asm b/tests.asm index 63a95d7..da92121 100644 --- a/tests.asm +++ b/tests.asm @@ -276,11 +276,9 @@ main: .tolowerLoop: movzx r10, byte [rdi] mov byte [rdi], r10b - push rcx - sub rsp, 8 + mov r11, rcx call tolower - add rsp, 8 - pop rcx + mov rcx, r11 mov byte [rdi], al inc rdi inc r10 @@ -298,11 +296,9 @@ main: .toupperLoop: movzx r10, byte [rdi] mov byte [rdi], r10b - push rcx - sub rsp, 8 + mov r11, rcx call toupper - add rsp, 8 - pop rcx + mov rcx, r11 mov byte [rdi], al inc rdi inc r10