1
2; ===============================================================
3; Dec 2013
4; ===============================================================
5;
6; void *obstack_blank_fast(struct obstack *ob, int size)
7;
8; Resize the currently growing object by signed size bytes.  If
9; the object grows, the extra space is uninitialized.
10;
11; No boundary checks are made.
12;
13; ===============================================================
14
15SECTION code_clib
16SECTION code_alloc_obstack
17
18PUBLIC asm_obstack_blank_fast
19
20asm_obstack_blank_fast:
21
22   ; enter : hl = struct obstack *ob
23   ;         bc = int size
24   ;
25   ; exit  : hl = struct obstack *ob
26   ;         de = old ob->fence (if growing, where new space in object begins)
27   ;
28   ; uses  : f, de
29
30   ld e,(hl)
31   inc hl
32   ld d,(hl)                   ; de = ob->fence
33
34   push de                     ; save old ob->fence
35
36   ex de,hl
37   add hl,bc                   ; fence += size
38   ex de,hl
39
40   ld (hl),d
41   dec hl
42   ld (hl),e
43
44   pop de                      ; de = old fence
45   ret
46