~ubuntu-branches/ubuntu/trusty/erlang/trusty

« back to all changes in this revision

Viewing changes to erts/emulator/beam/bif.h

  • Committer: Bazaar Package Importer
  • Author(s): Clint Byrum
  • Date: 2011-05-05 15:48:43 UTC
  • mfrom: (3.5.13 sid)
  • Revision ID: james.westby@ubuntu.com-20110505154843-0om6ekzg6m7ugj27
Tags: 1:14.b.2-dfsg-3ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Drop libwxgtk2.8-dev build dependency. Wx isn't in main, and not
    supposed to.
  - Drop erlang-wx binary.
  - Drop erlang-wx dependency from -megaco, -common-test, and -reltool, they
    do not really need wx. Also drop it from -debugger; the GUI needs wx,
    but it apparently has CLI bits as well, and is also needed by -megaco,
    so let's keep the package for now.
  - debian/patches/series: Do what I meant, and enable build-options.patch
    instead.
* Additional changes:
  - Drop erlang-wx from -et
* Dropped Changes:
  - patches/pcre-crash.patch: CVE-2008-2371: outer level option with
    alternatives caused crash. (Applied Upstream)
  - fix for ssl certificate verification in newSSL: 
    ssl_cacertfile_fix.patch (Applied Upstream)
  - debian/patches/series: Enable native.patch again, to get stripped beam
    files and reduce the package size again. (build-options is what
    actually accomplished this)
  - Remove build-options.patch on advice from upstream and because it caused
    odd build failures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * %CopyrightBegin%
3
 
 * 
4
 
 * Copyright Ericsson AB 1996-2009. All Rights Reserved.
5
 
 * 
 
3
 *
 
4
 * Copyright Ericsson AB 1996-2011. All Rights Reserved.
 
5
 *
6
6
 * The contents of this file are subject to the Erlang Public License,
7
7
 * Version 1.1, (the "License"); you may not use this file except in
8
8
 * compliance with the License. You should have received a copy of the
9
9
 * Erlang Public License along with this software. If not, it can be
10
10
 * retrieved online at http://www.erlang.org/.
11
 
 * 
 
11
 *
12
12
 * Software distributed under the License is distributed on an "AS IS"
13
13
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14
14
 * the License for the specific language governing rights and limitations
15
15
 * under the License.
16
 
 * 
 
16
 *
17
17
 * %CopyrightEnd%
18
18
 */
19
19
 
125
125
#define ERTS_BIF_PREP_TRAP0(Ret, Trap, Proc)            \
126
126
do {                                                    \
127
127
    (Proc)->arity = 0;                                  \
128
 
    (Proc)->def_arg_reg[3] = (Eterm) (Trap->address);   \
 
128
    *((UWord *) (UWord) ((Proc)->def_arg_reg + 3)) = (UWord) ((Trap)->address); \
129
129
    (Proc)->freason = TRAP;                             \
130
130
    (Ret) = THE_NON_VALUE;                              \
131
131
} while (0)
134
134
do {                                                    \
135
135
    (Proc)->arity = 1;                                  \
136
136
    (Proc)->def_arg_reg[0] = (Eterm) (A0);              \
137
 
    (Proc)->def_arg_reg[3] = (Eterm) ((Trap)->address); \
 
137
    *((UWord *) (UWord) ((Proc)->def_arg_reg + 3)) = (UWord) ((Trap)->address); \
138
138
    (Proc)->freason = TRAP;                             \
139
139
    (Ret) = THE_NON_VALUE;                              \
140
140
} while (0)
144
144
    (Proc)->arity = 2;                                  \
145
145
    (Proc)->def_arg_reg[0] = (Eterm) (A0);              \
146
146
    (Proc)->def_arg_reg[1] = (Eterm) (A1);              \
147
 
    (Proc)->def_arg_reg[3] = (Eterm) ((Trap)->address); \
 
147
    *((UWord *) (UWord) ((Proc)->def_arg_reg + 3)) = (UWord) ((Trap)->address); \
148
148
    (Proc)->freason = TRAP;                             \
149
149
    (Ret) = THE_NON_VALUE;                              \
150
150
} while (0)
155
155
    (Proc)->def_arg_reg[0] = (Eterm) (A0);              \
156
156
    (Proc)->def_arg_reg[1] = (Eterm) (A1);              \
157
157
    (Proc)->def_arg_reg[2] = (Eterm) (A2);              \
158
 
    (Proc)->def_arg_reg[3] = (Eterm) ((Trap)->address); \
 
158
    *((UWord *) (UWord) ((Proc)->def_arg_reg + 3)) = (UWord) ((Trap)->address); \
159
159
    (Proc)->freason = TRAP;                             \
160
160
    (Ret) = THE_NON_VALUE;                              \
161
161
} while (0)
162
162
 
163
163
#define BIF_TRAP0(p, Trap_) do {                        \
164
164
      (p)->arity = 0;                                   \
165
 
      (p)->def_arg_reg[3] = (Eterm) ((Trap_)->address); \
 
165
      *((UWord *) (UWord) ((p)->def_arg_reg + 3)) = (UWord) ((Trap_)->address); \
166
166
      (p)->freason = TRAP;                              \
167
167
      return THE_NON_VALUE;                             \
168
168
 } while(0)
170
170
#define BIF_TRAP1(Trap_, p, A0) do {                    \
171
171
      (p)->arity = 1;                                   \
172
172
      (p)->def_arg_reg[0] = (A0);                       \
173
 
      (p)->def_arg_reg[3] = (Eterm) ((Trap_)->address); \
 
173
      *((UWord *) (UWord) ((p)->def_arg_reg + 3)) = (UWord) ((Trap_)->address); \
174
174
      (p)->freason = TRAP;                              \
175
175
      return THE_NON_VALUE;                             \
176
176
 } while(0)
179
179
      (p)->arity = 2;                                   \
180
180
      (p)->def_arg_reg[0] = (A0);                       \
181
181
      (p)->def_arg_reg[1] = (A1);                       \
182
 
      (p)->def_arg_reg[3] = (Eterm) ((Trap_)->address); \
 
182
      *((UWord *) (UWord) ((p)->def_arg_reg + 3)) = (UWord) ((Trap_)->address); \
183
183
      (p)->freason = TRAP;                              \
184
184
      return THE_NON_VALUE;                             \
185
185
 } while(0)
189
189
      (p)->def_arg_reg[0] = (A0);                       \
190
190
      (p)->def_arg_reg[1] = (A1);                       \
191
191
      (p)->def_arg_reg[2] = (A2);                       \
192
 
      (p)->def_arg_reg[3] = (Eterm) ((Trap_)->address); \
 
192
      *((UWord *) (UWord) ((p)->def_arg_reg + 3)) = (UWord) ((Trap_)->address); \
193
193
      (p)->freason = TRAP;                              \
194
194
      return THE_NON_VALUE;                             \
195
195
 } while(0)
196
196
 
197
197
#define BIF_TRAP_CODE_PTR_0(p, Code_) do {              \
198
198
      (p)->arity = 0;                                   \
199
 
      (p)->def_arg_reg[3] = (Eterm) (Code_);            \
 
199
      *((UWord *) (UWord) ((p)->def_arg_reg + 3)) = (UWord) (Code_);    \
 
200
      (p)->freason = TRAP;                              \
 
201
      return THE_NON_VALUE;                             \
 
202
 } while(0)
 
203
 
 
204
#define BIF_TRAP_CODE_PTR_(p, Code_) do {               \
 
205
      *((UWord *) (UWord) ((p)->def_arg_reg + 3)) = (UWord) (Code_);    \
200
206
      (p)->freason = TRAP;                              \
201
207
      return THE_NON_VALUE;                             \
202
208
 } while(0)