From ae7067fb21899c03ff9e12f95730cfa1d649c7dd Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Mon, 23 Oct 2023 10:35:11 +0200 Subject: x86: fold a few of the "alternative" NOP patterns Since named objects may not overlap, the compiler is not permitted to do this for us, to avoid wasting space and cache bandwidth/capacity. --- gas/config/tc-i386.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'gas/config') diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 2b327b0..57ae6c5 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -1324,8 +1324,7 @@ static const unsigned char alt_3[] = static const unsigned char alt_4[] = {0x0f,0x1f,0x40,0x00}; /* nopl 0(%[re]ax,%[re]ax,1) */ -static const unsigned char alt_5[] = - {0x0f,0x1f,0x44,0x00,0x00}; +#define alt_5 (alt_6 + 1) /* nopw 0(%[re]ax,%[re]ax,1) */ static const unsigned char alt_6[] = {0x66,0x0f,0x1f,0x44,0x00,0x00}; @@ -1333,14 +1332,12 @@ static const unsigned char alt_6[] = static const unsigned char alt_7[] = {0x0f,0x1f,0x80,0x00,0x00,0x00,0x00}; /* nopl 0L(%[re]ax,%[re]ax,1) */ -static const unsigned char alt_8[] = - {0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00}; +#define alt_8 (alt_9 + 1) /* nopw 0L(%[re]ax,%[re]ax,1) */ static const unsigned char alt_9[] = {0x66,0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00}; /* nopw %cs:0L(%[re]ax,%[re]ax,1) */ -static const unsigned char alt_10[] = - {0x66,0x2e,0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00}; +#define alt_10 (alt_11 + 1) /* data16 nopw %cs:0L(%eax,%eax,1) */ static const unsigned char alt_11[] = {0x66,0x66,0x2e,0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00}; -- cgit v1.1