NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-vax/60100: vax libm: ALTENTRY labels land on NOP padding instead of entry mask, causing SIGILL on CALLS



The following reply was made to PR port-vax/60100; it has been noted by GNATS.

From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: port-vax/60100: vax libm: ALTENTRY labels land on NOP padding
 instead of entry mask, causing SIGILL on CALLS
Date: Wed, 18 Mar 2026 20:35:10 +0100

 The only usage of ALTENTRY in libm in -current is in
 
 src/lib/libm/arch/vax/n_sqrt.S:
 
 
 /* **************************** internal procedure */
 
         .hidden __libm_dsqrt_r5
 ALTENTRY(__libm_dsqrt_r5)
         halt
         halt
 __libm_dsqrt_r5_lcl:
                                 /* ENTRY POINT FOR cdabs and cdsqrt     */
                                 /* returns double square root scaled by */
                                 /* 2^%r6        */
 
 
 and that is probably proper ALTENTRY usage. All other places have been
 replaced by STRONG_ALIAS.
 
 Anyway, for both types of usage, this patch should fix the issue.
 
 Index: asm.h
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/vax/include/asm.h,v
 retrieving revision 1.30
 diff -u -p -r1.30 asm.h
 --- asm.h	6 Jan 2025 10:46:44 -0000	1.30
 +++ asm.h	18 Mar 2026 19:34:26 -0000
 @@ -78,7 +78,7 @@
  #define ASENTRY(x, regs)	_ENTRY(_ASM_LABEL(x), regs); _PROF_PROLOGUE
  #define END(x)			.size _C_LABEL(x),.-_C_LABEL(x)
  
 -#define ALTENTRY(x)		.globl _C_LABEL(x); _C_LABEL(x):
 +#define ALTENTRY(x)		.text; _ALIGN_TEXT; .globl _C_LABEL(x); _C_LABEL(x):
  #ifdef _NETBSD_REVISIONID
  #define RCSID(x)	.pushsection ".ident","MS",@progbits,1;		\
  			.asciz x;					\
 
 
 Martin
 



Home | Main Index | Thread Index | Old Index