This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] S390: Hotpatching fixes.


On Mon, Mar 09, 2015 at 12:22:21PM +0100, Dominik Vogt wrote:
> @@ -5308,34 +5309,14 @@ s390_asm_output_function_label (FILE *asm_out_file, const char *fname,
>  	 stored directly before the label without crossing a cacheline
>  	 boundary.  All this is necessary to make sure the trampoline code can
>  	 be changed atomically.  */
> +      function_alignment = MAX (8, DECL_ALIGN (decl) / BITS_PER_UNIT);
> +      if (! DECL_USER_ALIGN (decl))
> +	      function_alignment = MAX (function_alignment,
> +					(unsigned int) align_functions);

Wrong formatting.  function_alignment should be only 2 columns to the right
from if.

> +(define_insn "nop_6_byte"
> +  [(unspec_volatile [(const_int 0)] UNSPECV_NOP_6_BYTE)]
> +  ""

Shouldn't this use "TARGET_ZARCH" condition?

BTW, have you tried say:
__attribute__((hotpatch (0, 6))) void foo (void) { __builtin_unreachable (); }
?
Have you verified there never are real instructions before
NOTE_INSN_FUNCTION_BEG?

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]