On 13 April 2012 10:23, Kirk Wolf <k...@dovetail.com> wrote:
> It is also interesting (to me) to point out that "Metal C" uses the same 
> back-end.

One would think so, but I'm not so sure...

> Metal-C generates assembler code which is not dependent on the C library or
> LE, supports user inlined assembler code, etc.   Just like with C/C++, you
> can specify ARCH(),TUNE(), INLINE, etc.

Well actually, no, unless they've fixed it recently. The doc says you
can, but if you specify e.g. ARCH(0), along with METAL, you will get a
complaint:

CCN0790(S) Options "METAL" and "ARCHITECTURE(0)" are in conflict.

What the book says is that:

METAL disables:
DLL
RENT
XPLINK
IPA
HOT
DFP

METAL sets the following as defaults:
ARCH(5)
TUNE(5)
CSECT
HGPR(PRESERVE)
FLOAT(IEEE)
NOLONGNAME
NODEBUG(FORMAT(DWARF),NOHOOK,SYMBOL)

METAL ignores the following:
TARGET
INLRPT
GOFF
INLINE when OPTIMIZE(0) is in effect
All suboptions of INLINE

When it says "sets the following as defaults", I assumed they could
be overridden, but it seems not. Perhaps it should say "METAL forces
the following"... Or maybe it's almost right, and it's only downlevel
code generation they don't do. I haven't played with other
combinations of the "sets the following as defaults" group.

> With the explosion of new instructions, at what point does writing
> hand-written assembler code become less and less practical?

The old instructions continue to work perfectly well, and it's easy to
take advantage of new instructions that are primarily functional
rather than performance oriented, for instance the decimal FP set, the
20-bit displacement ones, unsigned arithmetic, the various rotates,
and so on and so on.

But it may be that when writing high performance assembler routines it
is now a lot harder to win a battle with a compiler that has advanced
knowledge of the underlying machine internals.

Tony H.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN

Reply via email to