I am writing some gas macros for creation of compliant functions and
calls in assembler for both s/390 and zSeries ABI's. Hoping someone on
the list can clarify these point for me around floating point.  The ABI
links are from the The Linux Foundation's LSB page:

https://www.linux-foundation.org/dbadmin/browse/standard.php

s/390 ELF ABI
<http://www.linux-foundation.org/spec/ELF/zSeries/lzsabi0_s390.html>

Registers ... f4 and f6 are nonvolatile; that is, they "belong" to the
calling function. A called function shall save these registers' values
before it changes them, restoring their values before it returns.
Registers ... f0, f1, f2, f3, f5, f6 through f15 are volatile; that is,
they are not preserved across function calls.  The chart above this
statement matches

The chart preceding these statements matches this text with this
additional information:
f0, f2 parameter passing and return values (volatile)
f4, f6 general purpose (saved)
f1, f3, f5, f7-f15 general purpose (volatile)

zSeries ELF ABI
<http://www.linux-foundation.org/spec/ELF/zSeries/lzsabi0_zSeries.html>

Registers ... f1, f3, f5 and f7 are nonvolatile; that is, they "belong"
to the calling function. A called function shall save these registers'
values before it changes them, restoring their values before it returns.
Registers ... f0, f2, f4, f6, f8 through f15 are volatile; that is, they
are not preserved across function calls.

However the chart preceding these statements indicates this:
f0, f2, f4, f6  parameter passing and return values (volatile)
f1, f3, f5, f7 general purpose (volatile)
f8-f15 general purpose (saved)

The chart really says this, but it does not match the above verbiage
below the chart:
f8-f15 are saved (verbiage says f1, f3, f5 and f7)
f0-f7 are volatile (verbiage says f0, f2, f4, f6, f8-f15)

The chart and words do not match.

Due to the inconsitency, this leads to three questions:

  1. Has the ABI changed for floating point between s/390 and zSeries
     versions?
  2. What is correct usage and volatility for zSeries (or is the s/390
     really wrong)?
  3. How does the inconsistency in the zSeries ELF ABI get fixed?

Thanks,
Harold Grovesteen

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to