Skip to contentSkip to conversation

arch: add missing predefines: __amd64 & __amd64__

PATCH In review [email protected] 2 participants 4 messages Jan 20, 2020 – Jan 22, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arch: add missing predefines: __amd64 & __amd64__

From: Luc Van Oostenryck <[email protected]>

These seem to be defined whenever the __x86_64 and __x86_64__ macros are defined.

So, do the same here too.

---
 lib.c | 2 ++
 1 file changed, 2 insertions(+)
lib.c +2 -0
index ee62eac1..9e72e8c4 100644
@@ -1390,6 +1390,8 @@ static void predefined_macros(void)
 		if (arch_m64 != ARCH_LP32) {
 			predefine("__x86_64__", 1, "1");
 			predefine("__x86_64", 1, "1");
+			predefine("__amd64__", 1, "1");
+			predefine("__amd64", 1, "1");
 			break;
 		}
 		/* fall-through */
Signature · 1 line
2.23.0
#1 lore raw
Quoted 9 lines · On Mon, Jan 20, 2020 at 01:51:52AM -0800, [email protected] wrote:

From: Luc Van Oostenryck <[email protected]>

These seem to be defined whenever the __x86_64 and __x86_64__ macros are defined.

So, do the same here too.

---

I already applied this but looking at it now, could you add your Signed-off-by so that I can see this came from you? Right now it looks like I cherry picking it from upstream Sparse.

regards,
dan carpenter

author
#2 lore raw
Quoted 6 lines · Dan Carpenter
Quoted 5 lines · On Mon, Jan 20, 2020 at 01:51:52AM -0800, [email protected] wrote:

From: Luc Van Oostenryck <[email protected]>

These seem to be defined whenever the __x86_64 and __x86_64__ macros are defined.

Quoted 8 lines
Quoted 4 lines

So, do the same here too.

---

I already applied this but looking at it now, could you add your Signed-off-by so that I can see this came from you? Right now it looks like I cherry picking it from upstream Sparse.

OK?

thanks
john

#3 lore raw
Quoted 13 lines · John Levon
Quoted 11 lines · Dan Carpenter
Quoted 9 lines · On Mon, Jan 20, 2020 at 01:51:52AM -0800, [email protected] wrote:

From: Luc Van Oostenryck <[email protected]>

These seem to be defined whenever the __x86_64 and __x86_64__ macros are defined.

So, do the same here too.

---

Quoted 7 lines
Quoted 3 lines

I already applied this but looking at it now, could you add your Signed-off-by so that I can see this came from you? Right now it looks like I cherry picking it from upstream Sparse.

OK?

I had already applied it so no worries. I meant next time.

regards,
dan carpenter