~rdoering/ubuntu/karmic/erlang/fix-535090

« back to all changes in this revision

Viewing changes to lib/hipe/x86/hipe_x86_main.erl

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-02-15 16:42:52 UTC
  • mfrom: (1.1.13 upstream)
  • mto: (3.3.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: james.westby@ubuntu.com-20090215164252-dxpjjuq108nz4noa
Upload to unstable after lenny is released.

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
-define(HIPE_X86_PP, hipe_amd64_pp).
11
11
-define(X86TAG, amd64). % XXX: kill this crap
12
12
-define(X86STR, "amd64").
 
13
-define(HIPE_X86_SPILL_RESTORE, hipe_amd64_spill_restore).
13
14
-else.
14
15
-define(HIPE_X86_MAIN, hipe_x86_main).
15
16
-define(RTL_TO_X86, rtl_to_x86). % XXX: kill this crap
19
20
-define(HIPE_X86_PP, hipe_x86_pp).
20
21
-define(X86TAG, x86). % XXX: kill this crap
21
22
-define(X86STR, "x86").
 
23
-define(HIPE_X86_SPILL_RESTORE, hipe_x86_spill_restore).
22
24
-endif.
23
25
 
24
26
-module(?HIPE_X86_MAIN).
33
35
?RTL_TO_X86(MFA, RTL, Options) ->
34
36
  Translated = ?option_time(?HIPE_RTL_TO_X86:translate(RTL),
35
37
                            "RTL-to-"?X86STR, Options),
36
 
  Allocated  = ?option_time(?HIPE_X86_RA:ra(Translated, Options),
 
38
  SpillRest = 
 
39
    case proplists:get_bool(caller_save_spill_restore, Options) of
 
40
      true ->
 
41
        ?option_time(?HIPE_X86_SPILL_RESTORE:spill_restore(Translated, Options),
 
42
                     ?X86STR" spill restore", Options);
 
43
      false ->
 
44
        Translated
 
45
    end,
 
46
  Allocated  = ?option_time(?HIPE_X86_RA:ra(SpillRest, Options),
37
47
                            ?X86STR" register allocation", Options),
38
48
  Framed     = ?option_time(?HIPE_X86_FRAME:frame(Allocated, Options), 
39
49
                            ?X86STR" frame", Options),