Compile x86/swscale_template with -mno-red-zone.
Replaces a very hackish hack to fix the same issue (call instruction overwriting stack variables). Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
This commit is contained in:
		
							parent
							
								
									d8289ff9a9
								
							
						
					
					
						commit
						424bcc46b5
					
				
							
								
								
									
										5
									
								
								configure
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								configure
									
									
									
									
										vendored
									
									
								
							@ -3179,6 +3179,10 @@ else
 | 
				
			|||||||
fi
 | 
					fi
 | 
				
			||||||
check_cflags -fno-math-errno
 | 
					check_cflags -fno-math-errno
 | 
				
			||||||
check_cflags -fno-signed-zeros
 | 
					check_cflags -fno-signed-zeros
 | 
				
			||||||
 | 
					check_cc -mno-red-zone <<EOF && noredzone_flags="-mno-red-zone"
 | 
				
			||||||
 | 
					int x;
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if enabled icc; then
 | 
					if enabled icc; then
 | 
				
			||||||
    # Just warnings, no remarks
 | 
					    # Just warnings, no remarks
 | 
				
			||||||
@ -3469,6 +3473,7 @@ SLIB_INSTALL_LINKS=${SLIB_INSTALL_LINKS}
 | 
				
			|||||||
SLIB_INSTALL_EXTRA_LIB=${SLIB_INSTALL_EXTRA_LIB}
 | 
					SLIB_INSTALL_EXTRA_LIB=${SLIB_INSTALL_EXTRA_LIB}
 | 
				
			||||||
SLIB_INSTALL_EXTRA_SHLIB=${SLIB_INSTALL_EXTRA_SHLIB}
 | 
					SLIB_INSTALL_EXTRA_SHLIB=${SLIB_INSTALL_EXTRA_SHLIB}
 | 
				
			||||||
SAMPLES:=${samples:-\$(FATE_SAMPLES)}
 | 
					SAMPLES:=${samples:-\$(FATE_SAMPLES)}
 | 
				
			||||||
 | 
					NOREDZONE_FLAGS=$noredzone_flags
 | 
				
			||||||
EOF
 | 
					EOF
 | 
				
			||||||
 | 
					
 | 
				
			||||||
get_version(){
 | 
					get_version(){
 | 
				
			||||||
 | 
				
			|||||||
@ -21,6 +21,8 @@ OBJS-$(HAVE_MMX)           +=  x86/rgb2rgb.o            \
 | 
				
			|||||||
OBJS-$(HAVE_VIS)           +=  sparc/yuv2rgb_vis.o
 | 
					OBJS-$(HAVE_VIS)           +=  sparc/yuv2rgb_vis.o
 | 
				
			||||||
OBJS-$(HAVE_YASM)          +=  x86/scale.o
 | 
					OBJS-$(HAVE_YASM)          +=  x86/scale.o
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					$(SUBDIR)x86/swscale_mmx.o: CFLAGS += $(NOREDZONE_FLAGS)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
TESTPROGS = colorspace swscale
 | 
					TESTPROGS = colorspace swscale
 | 
				
			||||||
 | 
					
 | 
				
			||||||
DIRS = bfin mlib ppc sparc x86
 | 
					DIRS = bfin mlib ppc sparc x86
 | 
				
			||||||
 | 
				
			|||||||
@ -1963,10 +1963,6 @@ static void RENAME(hyscale_fast)(SwsContext *c, int16_t *dst,
 | 
				
			|||||||
#if defined(PIC)
 | 
					#if defined(PIC)
 | 
				
			||||||
    DECLARE_ALIGNED(8, uint64_t, ebxsave);
 | 
					    DECLARE_ALIGNED(8, uint64_t, ebxsave);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
    // HACK: gcc 4.6 no longer decrements esp,
 | 
					 | 
				
			||||||
    // use this to make it reserve space for the call
 | 
					 | 
				
			||||||
    // return address
 | 
					 | 
				
			||||||
    void *dummy;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    __asm__ volatile(
 | 
					    __asm__ volatile(
 | 
				
			||||||
#if defined(PIC)
 | 
					#if defined(PIC)
 | 
				
			||||||
@ -2018,7 +2014,6 @@ static void RENAME(hyscale_fast)(SwsContext *c, int16_t *dst,
 | 
				
			|||||||
#if defined(PIC)
 | 
					#if defined(PIC)
 | 
				
			||||||
          ,"m" (ebxsave)
 | 
					          ,"m" (ebxsave)
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
          ,"m" (dummy)
 | 
					 | 
				
			||||||
        : "%"REG_a, "%"REG_c, "%"REG_d, "%"REG_S, "%"REG_D
 | 
					        : "%"REG_a, "%"REG_c, "%"REG_d, "%"REG_S, "%"REG_D
 | 
				
			||||||
#if !defined(PIC)
 | 
					#if !defined(PIC)
 | 
				
			||||||
         ,"%"REG_b
 | 
					         ,"%"REG_b
 | 
				
			||||||
@ -2040,10 +2035,6 @@ static void RENAME(hcscale_fast)(SwsContext *c, int16_t *dst1, int16_t *dst2,
 | 
				
			|||||||
#if defined(PIC)
 | 
					#if defined(PIC)
 | 
				
			||||||
    DECLARE_ALIGNED(8, uint64_t, ebxsave);
 | 
					    DECLARE_ALIGNED(8, uint64_t, ebxsave);
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
    // HACK: gcc 4.6 no longer decrements esp,
 | 
					 | 
				
			||||||
    // use this to make it reserve space for the call
 | 
					 | 
				
			||||||
    // return address
 | 
					 | 
				
			||||||
    void *dummy;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    __asm__ volatile(
 | 
					    __asm__ volatile(
 | 
				
			||||||
#if defined(PIC)
 | 
					#if defined(PIC)
 | 
				
			||||||
@ -2083,7 +2074,6 @@ static void RENAME(hcscale_fast)(SwsContext *c, int16_t *dst1, int16_t *dst2,
 | 
				
			|||||||
#if defined(PIC)
 | 
					#if defined(PIC)
 | 
				
			||||||
          ,"m" (ebxsave)
 | 
					          ,"m" (ebxsave)
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
          ,"m" (dummy)
 | 
					 | 
				
			||||||
        : "%"REG_a, "%"REG_c, "%"REG_d, "%"REG_S, "%"REG_D
 | 
					        : "%"REG_a, "%"REG_c, "%"REG_d, "%"REG_S, "%"REG_D
 | 
				
			||||||
#if !defined(PIC)
 | 
					#if !defined(PIC)
 | 
				
			||||||
         ,"%"REG_b
 | 
					         ,"%"REG_b
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user