From 754c5de7d9ba980b98f3213d1f446cf59166dc16 Mon Sep 17 00:00:00 2001 From: Jeremiah Orians Date: Sun, 30 Apr 2023 18:36:30 -0400 Subject: [PATCH] Add note about big endian architectures --- cc_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cc_core.c b/cc_core.c index 67c205e..733799b 100644 --- a/cc_core.c +++ b/cc_core.c @@ -2742,7 +2742,9 @@ void global_assignment() { /* Assume Int */ globals_list = emit("%", globals_list); globals_list = emit(global_token->s, globals_list); - padding_zeroes = register_size / 4 - 1; + + /* broken for big endian architectures */ + padding_zeroes = (register_size / 4) - 1; while(padding_zeroes > 0) { /* Assume positive Int */