🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Rob McMahon Wed, 28 Sep 1988 19:25
store_one_arg gives wrong alignment to emit_block_move
#1737
Author: Rob McMahon
Date: Wed, 28 Sep 1988 19:25
37 lines
1841 bytes
GCC 1.28.

The subject says it all really.  I only noticed this by inspection, but it
looks like a bug waiting to hit someone.  store_one_arg() in expr.c calls
emit_block_move with an align argument of TYPE_ALIGN (...) which is in bits,
whereas it wants it in bytes.

Fix:

RCS file: expr.c,v
retrieving revision 1.9.1.7
diff -c -r1.9.1.7 expr.c
*** /tmp/,RCSt1a01426	Wed Sep 28 20:06:37 1988
--- expr.c	Wed Sep 28 19:36:17 1988
***************
*** 4285,4291 ****
  	   local variable or parameter.  In that case, expand_expr
  	   does not fill our suggested target.  */
  	emit_block_move (arg->stack, arg->value, ARGS_SIZE_RTX (arg->size),
! 			 TYPE_ALIGN (TREE_TYPE (pval)));
  
        /* Now, if this value wanted to be partly in registers,
  	 move the value from the stack to the registers
--- 4285,4291 ----
  	   local variable or parameter.  In that case, expand_expr
  	   does not fill our suggested target.  */
  	emit_block_move (arg->stack, arg->value, ARGS_SIZE_RTX (arg->size),
! 			 TYPE_ALIGN (TREE_TYPE (pval)) / BITS_PER_UNIT);
  
        /* Now, if this value wanted to be partly in registers,
  	 move the value from the stack to the registers

Rob
-- 
UUCP:   ...!mcvax!ukc!warwick!cudcv	PHONE:  +44 203 523037
JANET:  cudcv@uk.ac.warwick             ARPA:   cudcv@warwick.ac.uk
Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads