This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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 4/4] S390: Vector ABI support


Andreas Arnez wrote:

> 	* s390-linux-tdep.c: Include "elf/s390.h" and "elf-bfd.h".
> 	(enum s390_vector_abi_kind): New enum.
> 	(struct gdbarch_tdep)<vector_abi>: New field.
> 	(s390_effective_inner_type): Add parameter min_size.  Stop
> 	unwrapping if the inner type is smaller than min_size.
> 	(s390_function_arg_float): Adjust call to
> 	s390_effective_inner_type.
> 	(s390_function_arg_vector): New function.
> 	(s390_function_arg_integer): Adjust comment.
> 	(struct s390_arg_state)<vr>: New field.
> 	(s390_handle_arg): Add parameter 'is_vararg'.  Pass vector
> 	arguments according to vector ABI when appropriate.
> 	(s390_push_dummy_call): Initialize the argument state's field
> 	'vr'.  Adjust calls to s390_handle_arg.
> 	(s390_register_return_value): Handle vector return values.
> 	(s390_return_value): Apply the "register" return value convention
> 	to a vector when appropriate.
> 	(s390_gdbarch_init): Initialize tdep->vector_abi.

> 	* NEWS: Announce S390 vector ABI support.

The NEWS change needs to be approved by Eli.


>  static void
>  s390_handle_arg (struct s390_arg_state *as, struct value *arg,
>  		 struct gdbarch_tdep *tdep, int word_size,
> -		 enum bfd_endian byte_order)
> +		 enum bfd_endian byte_order, int is_vararg)

Maybe "is_unnamed" would be better than "is_vararg".

> +  /* Determine vector ABI.  */
> +  if (have_vx
> +      && info.abfd != NULL
> +      && info.abfd->format == bfd_object
> +      && bfd_get_flavour (info.abfd) == bfd_target_elf_flavour
> +      && bfd_elf_get_obj_attr_int (info.abfd, OBJ_ATTR_GNU,
> +				   Tag_GNU_S390_ABI_Vector) == 2)

I think this needs to be under an #ifdef HAVE_ELF, otherwise we'd
get compile errors when building GDB on a non-ELF host system.


Otherwise, this is OK once the binutils patch is committed.

Thanks,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  Ulrich.Weigand@de.ibm.com


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