This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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] size reduction of Cell/SPU variable argument part


Patch applied. Thanks for addressing Patrick's comments.

Regards,

-- Jeff J.

Hidetaka Takano wrote:
Patrick,

Patch is corrupted, it has some extra newlines. The previous version never showed up on the newlib list.
--snip--
You can see the extra newline above.

Sorry, it was due to my mail program.. This time I've sent the patch as an attached file.

Sorry I did not comment on your last internal posting of the patch.

Not at all. I appriciate you.


Can you change all the enum SPE_C99_nnnn to defines, so we don't have some values in the include file twice?
And then use #ifndef __ASSEMBLER__ around other hunks.
I'd rather they were decimal values like we have in libgloss/spu/jsre.h.

OK. I've done it.


Just use the string for SIGCODE, NAME, and OPCODE rather than have a
define. PARMS is OK, or remove it and add a comment.

OK. I've modefied it.


Why is FP a define value? It is always 3, and the file pointer is always the first argument to fprintf and fscanf.

Originally, I intended to assemblerize not only variable argument APIs but also fixed ones. So some of fixed argument APIs have FP, which is not 3. (like fread -> 6) However, this time, to make it more simple, I've changed it as you pointed.

IMHO, include mk_syscall and the syscall.def even though they are not
automatically run, so the assembly code can be easily fixed and
regenerated (like if we removed the check_init code).

Difinitly. Ideally, it should be generated automatically in the build path. This time I just do add the file for maintenance.

I hope this patch would be fine for us.

I've added new Change log.
========================================================
newlib/ChangeLog:

2007-08-xx Hidetaka Takano <hidetaka.takano@glb.toshiba.co.jp>

	Reduce the memory consumption of variable argument functions
	for SPU (cell):
	* libc/machine/spu/Makefile.am: Replace printf/scanf family C sources
	  to assembler sources.
	* libc/machine/spu/Makefile.in: Regenerated.
	* libc/machine/spu/stdio.c: Add __check_init function wrapping
	  CHECK_INIT macro to use from assembler routines.
	* libc/machine/spu/c99ppe.h: Add definitions for assembler code.
	* libc/machine/spu/fiprintf.S: New file.
	* libc/machine/spu/fiscanf.S: Ditto.
	* libc/machine/spu/fprintf.S: Ditto.
	* libc/machine/spu/fscanf.S: Ditto.
	* libc/machine/spu/iprintf.S: Ditto.
	* libc/machine/spu/iscanf.S: Ditto.
	* libc/machine/spu/printf.S: Ditto.
	* libc/machine/spu/scanf.S: Ditto.
	* libc/machine/spu/siprintf.S: Ditto.
	* libc/machine/spu/siscanf.S: Ditto.
	* libc/machine/spu/sniprintf.S: Ditto.
	* libc/machine/spu/snprintf.S: Ditto.
	* libc/machine/spu/sprintf.S: Ditto.
	* libc/machine/spu/sscanf.S: Ditto.
	* libc/machine/spu/stack_reg_va.S: Ditto.
	* libc/machine/spu/syscall.def: Ditto. (for maintenance)
	* libc/machine/spu/mk_syscalls: Ditto. (for maintenance)
	* libc/machine/spu/fiprintf.c: Removed. (Replaced by .S)
	* libc/machine/spu/fiscanf.c: Ditto.
	* libc/machine/spu/fprintf.c: Ditto.
	* libc/machine/spu/fscanf.c: Ditto.
	* libc/machine/spu/iprintf.c: Ditto.
	* libc/machine/spu/iscanf.c: Ditto.
	* libc/machine/spu/printf.c: Ditto.
	* libc/machine/spu/scanf.c: Ditto.
	* libc/machine/spu/siprintf.c: Ditto.
	* libc/machine/spu/siscanf.c: Ditto.
	* libc/machine/spu/sniprintf.c: Ditto.
	* libc/machine/spu/snprintf.c: Ditto.
	* libc/machine/spu/sprintf.c: Ditto.
	* libc/machine/spu/sscanf.c: Ditto.

========================================================

Thank you.
---
Hidetaka Takano / Toshiba


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