Skip to contentSkip to conversation

2.4.16 Compiler warning

DISCUSSION Mike Black 2 participants 2 messages Nov 28, 2001

lore
Share & tools
lore

Mike Black

author
#0 lore raw

This appears to be a non-fatal warning....does this need to be cleaned up? gcc 2.95.3

gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -Wno-tri graphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fn
o-common -pipe -mpreferred-stack-boundary=2 -march=i686 -c -o pci-pc.o
pci-pc.c
{standard input}: Assembler messages:
{standard input}:1107: Warning: indirect lcall without *' {standard input}:1192: Warning: indirect lcall without *' {standard input}:1279: Warning: indirect lcall without *' {standard input}:1361: Warning: indirect lcall without *' {standard input}:1372: Warning: indirect lcall without *' {standard input}:1383: Warning: indirect lcall without *' {standard input}:1470: Warning: indirect lcall without *' {standard input}:1482: Warning: indirect lcall without *' {standard input}:1494: Warning: indirect lcall without *' {standard input}:1975: Warning: indirect lcall without *' {standard input}:2068: Warning: indirect lcall without `*'

Here's all the lcall's in pci-pc.c:

        __asm__("lcall (%%edi); cld"
                        "lcall (%%edi); cld\n\t"
        __asm__("lcall (%%edi); cld\n\t"
                __asm__("lcall (%%esi); cld\n\t"
                __asm__("lcall (%%esi); cld\n\t"
                __asm__("lcall (%%esi); cld\n\t"
                __asm__("lcall (%%esi); cld\n\t"
                __asm__("lcall (%%esi); cld\n\t"
                __asm__("lcall (%%esi); cld\n\t"
                "lcall (%%esi); cld\n\t"
        __asm__("lcall (%%esi); cld\n\t"

________________________________________
Michael D. Black Principal Engineer
[email protected] 321-676-2923,x203
http://www.csihq.com Computer Science Innovations
http://www.csihq.com/~mike My home page FAX 321-676-2355

#1 lore raw
Quoted 6 lines · Mike Black

This appears to be a non-fatal warning....does this need to be cleaned up? [...]
{standard input}: Assembler messages:
{standard input}:1107: Warning: indirect lcall without *' {standard input}:1192: Warning: indirect lcall without *' [...]

I believe this cannot be cleaned up in 2.4 because it breaks older binutils. However, what about the appended patch for 2.5?

arch/i386/boot/setup.S +1 -1
diff -X excl -urN linux-2.5.1-pre2.patches/arch/i386/boot/setup.S linux-2.5.1-pre2.work/arch/i386/boot/setup.S
@@ -539,7 +539,7 @@
 	cmpw	$0, %cs:realmode_swtch
 	jz	rmodeswtch_normal
 
-	lcall	%cs:realmode_swtch
+	lcall	*%cs:realmode_swtch
 
 	jmp	rmodeswtch_end
 
arch/i386/kernel/apm.c +2 -2
diff -X excl -urN linux-2.5.1-pre2.patches/arch/i386/kernel/apm.c linux-2.5.1-pre2.work/arch/i386/kernel/apm.c
@@ -526,7 +526,7 @@
 	__asm__ __volatile__(APM_DO_ZERO_SEGS
 		"pushl %%edi\n\t"
 		"pushl %%ebp\n\t"
-		"lcall %%cs:" SYMBOL_NAME_STR(apm_bios_entry) "\n\t"
+		"lcall *%%cs:" SYMBOL_NAME_STR(apm_bios_entry) "\n\t"
 		"setc %%al\n\t"
 		"popl %%ebp\n\t"
 		"popl %%edi\n\t"
@@ -573,7 +573,7 @@
 		__asm__ __volatile__(APM_DO_ZERO_SEGS
 			"pushl %%edi\n\t"
 			"pushl %%ebp\n\t"
-			"lcall %%cs:" SYMBOL_NAME_STR(apm_bios_entry) "\n\t"
+			"lcall *%%cs:" SYMBOL_NAME_STR(apm_bios_entry) "\n\t"
 			"setc %%bl\n\t"
 			"popl %%ebp\n\t"
 			"popl %%edi\n\t"
arch/i386/kernel/pci-pc.c +11 -11
diff -X excl -urN linux-2.5.1-pre2.patches/arch/i386/kernel/pci-pc.c linux-2.5.1-pre2.work/arch/i386/kernel/pci-pc.c
@@ -458,7 +458,7 @@
 	unsigned long flags;
 
 	__save_flags(flags); __cli();
-	__asm__("lcall (%%edi); cld"
+	__asm__("lcall *(%%edi); cld"
 		: "=a" (return_code),
 		  "=b" (address),
 		  "=c" (length),
@@ -499,7 +499,7 @@
 
 		__save_flags(flags); __cli();
 		__asm__(
-			"lcall (%%edi); cld\n\t"
+			"lcall *(%%edi); cld\n\t"
 			"jc 1f\n\t"
 			"xor %%ah, %%ah\n"
 			"1:"
@@ -544,7 +544,7 @@
 	unsigned short bx;
 	unsigned short ret;
 
-	__asm__("lcall (%%edi); cld\n\t"
+	__asm__("lcall *(%%edi); cld\n\t"
 		"jc 1f\n\t"
 		"xor %%ah, %%ah\n"
 		"1:"
@@ -573,7 +573,7 @@
 
 	switch (len) {
 	case 1:
-		__asm__("lcall (%%esi); cld\n\t"
+		__asm__("lcall *(%%esi); cld\n\t"
 			"jc 1f\n\t"
 			"xor %%ah, %%ah\n"
 			"1:"
@@ -585,7 +585,7 @@
 			  "S" (&pci_indirect));
 		break;
 	case 2:
-		__asm__("lcall (%%esi); cld\n\t"
+		__asm__("lcall *(%%esi); cld\n\t"
 			"jc 1f\n\t"
 			"xor %%ah, %%ah\n"
 			"1:"
@@ -597,7 +597,7 @@
 			  "S" (&pci_indirect));
 		break;
 	case 4:
-		__asm__("lcall (%%esi); cld\n\t"
+		__asm__("lcall *(%%esi); cld\n\t"
 			"jc 1f\n\t"
 			"xor %%ah, %%ah\n"
 			"1:"
@@ -628,7 +628,7 @@
 
 	switch (len) {
 	case 1:
-		__asm__("lcall (%%esi); cld\n\t"
+		__asm__("lcall *(%%esi); cld\n\t"
 			"jc 1f\n\t"
 			"xor %%ah, %%ah\n"
 			"1:"
@@ -640,7 +640,7 @@
 			  "S" (&pci_indirect));
 		break;
 	case 2:
-		__asm__("lcall (%%esi); cld\n\t"
+		__asm__("lcall *(%%esi); cld\n\t"
 			"jc 1f\n\t"
 			"xor %%ah, %%ah\n"
 			"1:"
@@ -652,7 +652,7 @@
 			  "S" (&pci_indirect));
 		break;
 	case 4:
-		__asm__("lcall (%%esi); cld\n\t"
+		__asm__("lcall *(%%esi); cld\n\t"
 			"jc 1f\n\t"
 			"xor %%ah, %%ah\n"
 			"1:"
@@ -875,7 +875,7 @@
 	__asm__("push %%es\n\t"
 		"push %%ds\n\t"
 		"pop  %%es\n\t"
-		"lcall (%%esi); cld\n\t"
+		"lcall *(%%esi); cld\n\t"
 		"pop %%es\n\t"
 		"jc 1f\n\t"
 		"xor %%ah, %%ah\n"
@@ -908,7 +908,7 @@
 {
 	int ret;
 
-	__asm__("lcall (%%esi); cld\n\t"
+	__asm__("lcall *(%%esi); cld\n\t"
 		"jc 1f\n\t"
 		"xor %%ah, %%ah\n"
 		"1:"