This is the mail archive of the
mailing list for the GCC project.
Blcopy for outgoing arguments.
- From: Umesh Kalappa <umesh dot kalappa0 at gmail dot com>
- To: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Fri, 9 May 2014 21:17:41 +0530
- Subject: Blcopy for outgoing arguments.
- Authentication-results: sourceware.org; auth=none
Good day there.
We are porting the gcc 4.8.1 and defined the calling conventions like
If(sizeof(arg) < = 2)
Pass with reg.
Pass by stack.
The problem is that the code is bloated for the datatype where
sizeof(datatype) > 2 .i.e
We see the sequences of load from the stack (for local) and store
to stack(outgoiing args) like
and goes on for large type size â..
So we thought of having blkcopy intrinsic function which takes the
address of src and dst along size and the alignment info.
Se we defined the some of the gcc macros like
#defined MOVE_MAX 2
#define MOVE_BY_PIECES_P(SIZE, ALIGN) \
( (SIZE) == 1 || (SIZE) == 2 )
And define movmemhi pattern( word size is 2 byte) as
;; Argument 0 is the destination
;; Argument 1 is the source
;; Argument 2 is the length
;; Argument 3 is the alignment
[(match_operand 0 "general_operand" "")
(match_operand 1 "general_operand" "")
(match_operand 2 "register_operand" "")
(match_operand 3 "" "")
rtx libfunc = init_one_libfunc ("blkcopy ");
emit_library_call_value (libfunc,NULL_RTX, LCT_NORMAL, VOIDmode,
After all this ,we still see the sequences of load from the stack
(for local) and store to stack(outgoiing args) and backend is not
able to emit the libcall for the blockcopy.
We are debugging the issue and the meanwhile appreciate any help from
the group .
Thank you and waiting for a any reply