14fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor/* Linux/x86-64 system call ABI in DWARF register numbers.
24fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor   Copyright (C) 2008 Red Hat, Inc.
34fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor   This file is part of Red Hat elfutils.
44fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor
54fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor   Red Hat elfutils is free software; you can redistribute it and/or modify
64fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor   it under the terms of the GNU General Public License as published by the
74fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor   Free Software Foundation; version 2 of the License.
84fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor
94fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor   Red Hat elfutils is distributed in the hope that it will be useful, but
104fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor   WITHOUT ANY WARRANTY; without even the implied warranty of
114fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
124fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor   General Public License for more details.
134fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor
144fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor   You should have received a copy of the GNU General Public License along
154fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor   with Red Hat elfutils; if not, write to the Free Software Foundation,
164fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor   Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA.
174fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor
184fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor   Red Hat elfutils is an included package of the Open Invention Network.
194fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor   An included package of the Open Invention Network is a package for which
209db7dbb918ca49f4ee6c181e4917e7b6ec547353Douglas Gregor   Open Invention Network licensees cross-license their patents.  No patent
214fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor   license is granted, either expressly or impliedly, by designation as an
224fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor   included package.  Should you wish to participate in the Open Invention
234fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor   Network licensing program, please visit www.openinventionnetwork.com
244fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor   <http://www.openinventionnetwork.com>.  */
254fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor
26770b4a8834670e9427d3ce5a1a8472eb86f45fd2Benjamin Kramer#ifdef HAVE_CONFIG_H
274fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor# include <config.h>
284fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor#endif
294fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor
304fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor#define BACKEND x86_64_
314fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor#include "libebl_CPU.h"
32512ce60311b93b6f9a144fb2cf9fe4225f5d57b2Daniel Dunbar
33512ce60311b93b6f9a144fb2cf9fe4225f5d57b2Daniel Dunbarint
3442f42c0dd5cf71fbfc6fa282d03079a902f6e342Eli Friedmanx86_64_syscall_abi (Ebl *ebl __attribute__ ((unused)),
354fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor		    int *sp, int *pc, int *callno, int args[6])
360d59292581dbaa4203451709077de40e0ad72c18Anders Carlsson{
371eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump  *sp = 7;			/* %rsp */
384fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor  *pc = 16;			/* %rip */
391eb4433ac451dc16f4133a88af2d002ac26c58efMike Stump  *callno = 0;			/* %rax */
404fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor  args[0] = 5;			/* %rdi */
414fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor  args[1] = 4;			/* %rsi */
424fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor  args[2] = 1;			/* %rdx */
434fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor  args[3] = 10;			/* %r10 */
444fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor  args[4] = 8;			/* %r8 */
454fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor  args[5] = 9;			/* %r9 */
464fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor  return 0;
474fe0c8e9c76b96e7aff21696a40dacc09d0237bcDouglas Gregor}
48162e1c1b487352434552147967c3dd296ebee2f7Richard Smith