D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6563 - wrong code when using at least 8 XMM regs
Summary: wrong code when using at least 8 XMM regs
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other FreeBSD
: P2 normal
Assignee: No Owner
URL:
Keywords: wrong-code
: 6562 (view as issue list)
Depends on:
Blocks:
 
Reported: 2011-08-27 11:52 UTC by Martin Nowak
Modified: 2011-08-27 20:14 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Martin Nowak 2011-08-27 11:52:50 UTC
alias float T;
T val = 1;

int plot(T a, T b, T c, T d, T e, T f, T g, T h) {
  assert(a == val);
  return 0;
}

int main() {
  return plot(
      val,
      val,
      val,
      val,
      val,
      val,
      val,
      val,
  );
}

--

The values h-b are correctly loaded from XMM0-XMM6.
The calling function put a correctly into XMM7 but the plot
function loads it from the calling stack (misinterpreted as push parameter).
Comment 2 Mariusz Gliwiński 2011-08-27 18:20:52 UTC
*** Issue 6562 has been marked as a duplicate of this issue. ***