scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 111b31be282ae37b07cf1fd65a17a5a5e66a40de
parent 7961958fd5f94b21d4c1c136d064bedb337303a4
Author: Quentin Carbonneaux <quentin@c9x.me>
Date:   Sun, 19 Feb 2017 10:26:39 -0500

[cc2-qbe] fix inverted shifting operations

Diffstat:
cc2/arch/qbe/code.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/cc2/arch/qbe/code.c b/cc2/arch/qbe/code.c @@ -55,8 +55,8 @@ static struct opdata { [ASDIVW] = {.fun = binary, .txt = "div", .letter = 'w'}, [ASUDIVW] = {.fun = binary, .txt = "udiv", .letter = 'w'}, [ASSHLW] = {.fun = binary, .txt = "shl", .letter = 'w'}, - [ASSHRW] = {.fun = binary, .txt = "shr", .letter = 'w'}, - [ASUSHRW] = {.fun = binary, .txt = "sar", .letter = 'w'}, + [ASSHRW] = {.fun = binary, .txt = "sar", .letter = 'w'}, + [ASUSHRW] = {.fun = binary, .txt = "shr", .letter = 'w'}, [ASLTW] = {.fun = binary, .txt = "csltw", .letter = 'w'}, [ASULTW] = {.fun = binary, .txt = "cultw", .letter = 'w'}, [ASGTW] = {.fun = binary, .txt = "csgtw", .letter = 'w'}, @@ -79,8 +79,8 @@ static struct opdata { [ASDIVL] = {.fun = binary, .txt = "div", .letter = 'l'}, [ASUDIVL] = {.fun = binary, .txt = "udiv", .letter = 'l'}, [ASSHLL] = {.fun = binary, .txt = "shl", .letter = 'l'}, - [ASSHRL] = {.fun = binary, .txt = "shr", .letter = 'l'}, - [ASUSHRL] = {.fun = binary, .txt = "sar", .letter = 'l'}, + [ASSHRL] = {.fun = binary, .txt = "sar", .letter = 'l'}, + [ASUSHRL] = {.fun = binary, .txt = "shr", .letter = 'l'}, [ASLTL] = {.fun = binary, .txt = "csltl", .letter = 'w'}, [ASULTL] = {.fun = binary, .txt = "cultl", .letter = 'w'}, [ASGTL] = {.fun = binary, .txt = "csgtl", .letter = 'w'},