[hackers] [scc] [cc2-intel] Fix .space directive || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Wed, 27 Jan 2016 16:59:15 +0100 (CET)

commit b64ef1259866bf8d967c6df793bc4fb79c0078ba
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Tue Jan 26 22:11:40 2016 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Tue Jan 26 22:19:09 2016 +0100

    [cc2-intel] Fix .space directive
    
    We have to put always a 0 after allocating any data in bss,
    and it menas that we also put a 0 in the case of .space,
    where it is not needed. For this reason we need a comma
    in the format string or we will have the size multiplied
    by 10.

diff --git a/cc2/arch/amd64-sysv/code.c b/cc2/arch/amd64-sysv/code.c
index fea9edb..833a25a 100644
--- a/cc2/arch/amd64-sysv/code.c
+++ b/cc2/arch/amd64-sysv/code.c
_AT_@ -123,7 +123,7 @@ size2asm(Type *tp)
                         s = "\t.quad\t";
                         break;
                 default:
- s = "\t.space\t%llu";
+ s = "\t.space\t%llu,";
                         break;
                 }
         }
diff --git a/cc2/arch/i386-sysv/code.c b/cc2/arch/i386-sysv/code.c
index 8a55786..5d6cf11 100644
--- a/cc2/arch/i386-sysv/code.c
+++ b/cc2/arch/i386-sysv/code.c
_AT_@ -123,7 +123,7 @@ size2asm(Type *tp)
                         s = "\t.quad\t";
                         break;
                 default:
- s = "\t.space\t%llu";
+ s = "\t.space\t%llu,";
                         break;
                 }
         }
Received on Wed Jan 27 2016 - 16:59:15 CET

This archive was generated by hypermail 2.3.0 : Wed Jan 27 2016 - 17:00:40 CET