From 54e9979f2291f1258f0c35aecba4c04dabc6f28d Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Tue, 4 Apr 2006 06:09:27 +0000 Subject: [PATCH] Push, Pop, Enter and Leave added --- ir/be/ia32/ia32_spec.pl | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/ir/be/ia32/ia32_spec.pl b/ir/be/ia32/ia32_spec.pl index 93c507063..236b32073 100644 --- a/ir/be/ia32/ia32_spec.pl +++ b/ir/be/ia32/ia32_spec.pl @@ -474,6 +474,30 @@ $comment_string = "/*"; "emit" => '. lea %D1, %ia32_emit_am /* LEA(%A1, %A2) */' }, +"Push" => { + "comment" => "push a gp register on the stack", + "reg_req" => { "in" => [ "esp", "gp", "none" ], "out" => [ "gp" ] }, + "emit" => '. push %S2 /* Push(%A2) */' +}, + +"Pop" => { + "comment" => "pop a gp register from the stack", + "reg_req" => { "in" => [ "esp", "none" ], "out" => [ "gp", "esp" ] }, + "emit" => '. pop %D1 /* Pop -> %D1 */' +}, + +"Enter" => { + "comment" => "create stack frame", + "reg_req" => { "in" => [ "esp" ], "out" => [ "ebp", "esp" ] }, + "emit" => '. enter /* Enter */' +}, + +"Leave" => { + "comment" => "destroy stack frame", + "reg_req" => { "in" => [ "esp", "ebp" ], "out" => [ "esp" ] }, + "emit" => '. leave /* Enter */' +}, + #-----------------------------------------------------------------------------# # _____ _____ ______ __ _ _ _ # # / ____/ ____| ____| / _| | | | | | # -- 2.20.1