[Gc] libatomic_ops: WinCE ARM initial support addition

Ivan Maidanski ivmai at mail.ru
Thu Aug 6 03:05:16 PDT 2009


Hi!

The suggested patch does:
- add initial support for VC++ for arm target;
- move VC++ arch-independent 32-bit code from x86.h to a new common32_defs.h file (included from x86.h and new arm.h).

The patch is against the current CVS plus my diff107_cvs and diff109_cvs (but, in fact, if needed, it could be relatively easily applied to the unmodified CVS version as well).

libatomic_ops ChangeLog entries:

	* src/atomic_ops/sysdeps/msftc/arm.h: New file (initial support
	for ARM family).
	* src/atomic_ops/sysdeps/msftc/common32_defs.h: New file.
	* src/atomic_ops/sysdeps/msftc/arm.h (AO_ASSUME_ARM_ARCH6): New
	macro.
	* src/atomic_ops/sysdeps/msftc/common32_defs.h
	(AO_USE_INTERLOCKED_INTRINSICS): Ditto.
	* src/atomic_ops/sysdeps/msftc/x86.h: Move "Interlocked"
	declarations to common32_defs.h.
	* src/atomic_ops/sysdeps/msftc/common32_defs.h
	(AO_INTERLOCKED_VOLATILE): New macro defined (used by
	Interlocked-based primitives) for compatibility with older VC++.
	* src/atomic_ops/sysdeps/msftc/common32_defs.h: Don't include
	missing <intrin.h> if WinCE target.
	* src/atomic_ops/sysdeps/msftc/x86.h: Include common32_defs.h
	(define AO_USE_INTERLOCKED_INTRINSICS unconditionally).
	* src/atomic_ops/sysdeps/msftc/x86.h (AO_fetch_and_add_full,
	AO_fetch_and_add1_full, AO_fetch_and_sub1_full,
	AO_compare_and_swap_full): Move arch-independent primitives to
	common32_defs.h.
	* src/atomic_ops/sysdeps/msftc/x86.h: Remove comment about i486 or
	better CPU (since Interlocked Add and Xchg primitives are available
	on any 32-bit CPU).
	* src/atomic_ops.h: Include msftc/x86.h even if _M_IX86 is less than
	400 (for i80386).
	* src/atomic_ops.h: Include msftc/x86.h if "x86" defined (for WinCE
	on x86).
	* src/atomic_ops.h: Include msftc/arm.h if ARM target (for WinCE).

PS. For WinCE/ARM, use -DAO_ASSUME_ARM_ARCH6 -DAO_UNIPROCESSOR (for now).

PS 2. No real testing on WinCE has been done (but it coud be compiled, at least).

PS 3. My patches backlog: my current libatomic_ops = CVS/bdwgc/libatomic_ops +diff106 +diff107_cvs +diff108_cvs +diff109_cvs +diff110.

Bye.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff110
Type: application/octet-stream
Size: 11625 bytes
Desc: not available
Url : http://napali.hpl.hp.com/pipermail/gc/attachments/20090806/3b2bd153/diff110.obj


More information about the Gc mailing list