Updates to Tomato RAF including NGINX && PHP
[tomato.git] / release / src / router / lzo / asm / i386 / src / leave.ash
blob0fdb729f0f8c4af3e64f46d417a52589164d22a5
1 /* leave.ash -- LZO assembler stuff
3    This file is part of the LZO real-time data compression library.
5    Copyright (C) 2011 Markus Franz Xaver Johannes Oberhumer
6    Copyright (C) 2010 Markus Franz Xaver Johannes Oberhumer
7    Copyright (C) 2009 Markus Franz Xaver Johannes Oberhumer
8    Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
9    Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
10    Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
11    Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer
12    Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer
13    Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer
14    Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
15    Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
16    Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
17    Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
18    Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
19    Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
20    Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
21    All Rights Reserved.
23    The LZO library is free software; you can redistribute it and/or
24    modify it under the terms of the GNU General Public License as
25    published by the Free Software Foundation; either version 2 of
26    the License, or (at your option) any later version.
28    The LZO library is distributed in the hope that it will be useful,
29    but WITHOUT ANY WARRANTY; without even the implied warranty of
30    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
31    GNU General Public License for more details.
33    You should have received a copy of the GNU General Public License
34    along with the LZO library; see the file COPYING.
35    If not, write to the Free Software Foundation, Inc.,
36    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
38    Markus F.X.J. Oberhumer
39    <markus@oberhumer.com>
40    http://www.oberhumer.com/opensource/lzo/
41  */
44 /***********************************************************************
46 ************************************************************************/
48 /* check uncompressed size */
49 #if defined(LZO_TEST_DECOMPRESS_OVERRUN_OUTPUT)
50         cmpl    OUTEND,%edi
51         ja      .L_output_overrun
52 #endif
54 /* check compressed size */
55         movl    INP,%edx
56         addl    INS,%edx
57         cmpl    %edx,%esi       /* check compressed size */
58         ja      .L_input_overrun
59         jb      .L_input_not_consumed
61 .L_leave:
62         subl    OUTP,%edi       /* write back the uncompressed size */
63         movl    OUTS,%edx
64         movl    %edi,(%edx)
66         negl    %eax
67         addl    $12,%esp
68         popl    %edx
69         popl    %ecx
70         popl    %ebx
71         popl    %esi
72         popl    %edi
73         popl    %ebp
74 #if 1
75         ret
76 #else
77         jmp     .L_end
78 #endif
81 .L_error:
82         movl    $1,%eax         /* LZO_E_ERROR */
83         jmp     .L_leave
85 .L_input_not_consumed:
86         movl    $8,%eax         /* LZO_E_INPUT_NOT_CONSUMED */
87         jmp     .L_leave
89 .L_input_overrun:
90         movl    $4,%eax         /* LZO_E_INPUT_OVERRUN */
91         jmp     .L_leave
93 #if defined(LZO_TEST_DECOMPRESS_OVERRUN_OUTPUT)
94 .L_output_overrun:
95         movl    $5,%eax         /* LZO_E_OUTPUT_OVERRUN */
96         jmp     .L_leave
97 #endif
99 #if defined(LZO_TEST_DECOMPRESS_OVERRUN_LOOKBEHIND)
100 .L_lookbehind_overrun:
101         movl    $6,%eax         /* LZO_E_LOOKBEHIND_OVERRUN */
102         jmp     .L_leave
103 #endif
105 #if defined(LZO_DEBUG)
106 .L_assert_fail:
107         movl    $99,%eax
108         jmp     .L_leave
109 #endif
111 .L_end:
115 vi:ts=4