summaryrefslogtreecommitdiff
path: root/support/regression/tests/bug3304184.c
blob: 3afcfb7b8d9fdfb717d6378938cf0b4a7d126051 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/** bug3304184.c
*/

#include <testfwk.h>

/////////////////////////////////////////////////////////////////////////////
//
// File: util_xor_arrays.c
//
// Copyright S. Brennen Ball, 2010
//
// The author provides no guarantees, warantees, or promises, implied or
//  otherwise.  By using this software you agree to indemnify the author
//  of any damages incurred by using it.
//
/////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
/////////////////////////////////////////////////////////////////////////////

#include <stdint.h>

#define __TARG_FUNC_POSTDECL		__reentrant

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// void util_xor_arrays(const uint8_t * input_block_a, const uint8_t * input_block_b, uint8_t * output_block, const uint16_t len) __TARG_FUNC_POSTDECL
//
// Description:
//  XORs two arrays.
//
// Parameters (when using for pre-encryption):
//  const uint8_t * input_block_a - input block A
//  const uint8_t * input_block_b - input block B
//  uint8_t * output_block - output block
//  uint16_t len - number of bytes to XOR
//
// Return value:
//  None
//
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void util_xor_arrays(const uint8_t * input_block_a, const uint8_t * input_block_b, uint8_t * output_block, const uint16_t len) __TARG_FUNC_POSTDECL
{
	uint16_t i;

	for(i = 0; i < len; i++)
	{
		output_block[i] = input_block_a[i] ^ input_block_b[i];
	}
}

/* compiling util_xor_arrays gave the following error due to target out of range for cjne
   Error: <a> machine specific addressing or addressing mode error */
void testBug(void)
{
}