This file is indexed.

/usr/include/gpsim/14bit-instructions.h is in gpsim-dev 0.29.0-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
/*
   Copyright (C) 1998 T. Scott Dattalo
		 2013 Roy R. Rankin

This file is part of the libgpsim library of gpsim

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, see 
<http://www.gnu.org/licenses/lgpl-2.1.html>.
*/

class instruction;  // forward declaration for the include files that follow

#ifndef __14BIT_INSTRUCTIONS_H__
#define __14BIT_INSTRUCTIONS_H__

#define REG_IN_INSTRUCTION_MASK  0x7f
#define DESTINATION_MASK         0x80

#include "pic-instructions.h"
#include "12bit-instructions.h"
#include "14bit-registers.h"


//---------------------------------------------------------
class ADDFSR : public instruction 
{

public:
  ADDFSR(Processor *new_cpu, unsigned int new_opcode,const char *, unsigned int address);
  virtual bool isBase() { return true;}
  virtual void execute();
  virtual char *name(char *,int);
  static instruction *construct(Processor *new_cpu, unsigned int new_opcode, unsigned int address)
  {
    return new ADDFSR(new_cpu,new_opcode,"addfsr", address);
  }
protected:
  unsigned int 	m_fsr;
  int 		m_lit;
  Indirect_Addressing14 *ia;
};

//---------------------------------------------------------

class ADDLW : public Literal_op
{

public:
  ADDLW(Processor *new_cpu, unsigned int new_opcode, unsigned int address);
  virtual void execute(void);
  static instruction *construct(Processor *new_cpu, unsigned int new_opcode, unsigned int address)
    {return new ADDLW(new_cpu,new_opcode, address);}

};

//---------------------------------------------------------
class ADDWFC : public Register_op
{
public:

  ADDWFC(Processor *new_cpu, unsigned int new_opcode, unsigned int address);
  virtual void execute();
  static instruction *construct(Processor *new_cpu, unsigned int new_opcode, unsigned int address)
  {return new ADDWFC(new_cpu,new_opcode,address);}
};

//---------------------------------------------------------
class BRA : public instruction
{
public:
  int destination_index;
  unsigned int absolute_destination_index;

  BRA(Processor *new_cpu, unsigned int new_opcode, unsigned int address);
  virtual void execute();
  virtual char *name(char *,int);
  virtual bool isBase() { return true;}
  static instruction *construct(Processor *new_cpu, unsigned int new_opcode, unsigned int address)
  {return new BRA(new_cpu,new_opcode,address);}
};

//---------------------------------------------------------
class BRW : public instruction
{
public:
  int destination_index;
  unsigned int absolute_destination_index;

  BRW(Processor *new_cpu, unsigned int new_opcode, unsigned int address);
  virtual void execute();
  virtual char *name(char *,int);
  virtual bool isBase() { return true;}
  static instruction *construct(Processor *new_cpu, unsigned int new_opcode, unsigned int address)
  {return new BRW(new_cpu,new_opcode,address);}
};

//---------------------------------------------------------
class ASRF : public Register_op
{
public:

  ASRF(Processor *new_cpu, unsigned int new_opcode, unsigned int address);
  virtual void execute();
  static instruction *construct(Processor *new_cpu, unsigned int new_opcode, unsigned int address)
  {return new ASRF(new_cpu,new_opcode,address);}
};

//---------------------------------------------------------
class CALLW : public instruction
{
public:
  CALLW(Processor *new_cpu, unsigned int new_opcode, unsigned int address);
  virtual bool isBase() { return true;}
  virtual void execute();
  virtual char *name(char *,int);
  static instruction *construct(Processor *new_cpu, unsigned int new_opcode, unsigned int address)
  {
    return new CALLW(new_cpu,new_opcode,address);
  }
};

//---------------------------------------------------------
class LSLF : public Register_op
{
public:

  LSLF(Processor *new_cpu, unsigned int new_opcode, unsigned int address);
  virtual void execute();
  static instruction *construct(Processor *new_cpu, unsigned int new_opcode, unsigned int address)
  {return new LSLF(new_cpu,new_opcode,address);}
};

//---------------------------------------------------------
class LSRF : public Register_op
{
public:

  LSRF(Processor *new_cpu, unsigned int new_opcode, unsigned int address);
  virtual void execute();
  static instruction *construct(Processor *new_cpu, unsigned int new_opcode, unsigned int address)
  {return new LSRF(new_cpu,new_opcode,address);}
};

//---------------------------------------------------------
class MOVIW : public instruction
{
public:

  MOVIW(Processor *new_cpu, unsigned int new_opcode, unsigned int address);
  virtual void execute();
  virtual bool isBase() { return true;}
  static instruction *construct(Processor *new_cpu, unsigned int new_opcode, unsigned int address)
  {return new MOVIW(new_cpu,new_opcode,address);}
  virtual char *name(char *,int);

  enum {
	PREINC,
	PREDEC,
	POSTINC,
	POSTDEC,
	DELTA
  };
protected:
  unsigned int 	m_fsr;
  int 		m_lit;
  unsigned int 	m_op;
  Indirect_Addressing14 *ia;
};


//---------------------------------------------------------
class MOVWI : public instruction
{
public:

  MOVWI(Processor *new_cpu, unsigned int new_opcode, unsigned int address);
  virtual void execute();
  virtual bool isBase() { return true;}
  static instruction *construct(Processor *new_cpu, unsigned int new_opcode, unsigned int address)
  {return new MOVWI(new_cpu,new_opcode,address);}
  virtual char *name(char *,int);

  enum {
	PREINC,
	PREDEC,
	POSTINC,
	POSTDEC,
	DELTA
  };
protected:
  unsigned int 	m_fsr;
  int 		m_lit;
  unsigned int 	m_op;
  Indirect_Addressing14 *ia;
};



//---------------------------------------------------------

class MOVLB : public Literal_op
{
public:
  MOVLB(Processor *new_cpu, unsigned int new_opcode, unsigned int address);
  virtual void execute();
  virtual char *name(char *return_str,int len);
  static instruction *construct(Processor *new_cpu, unsigned int new_opcode, unsigned int address)
  {return new MOVLB(new_cpu,new_opcode,address);}

};

//---------------------------------------------------------

class MOVLP : public Literal_op
{
public:
  MOVLP(Processor *new_cpu, unsigned int new_opcode, unsigned int address);
  virtual void execute();
  virtual char *name(char *return_str,int len);
  static instruction *construct(Processor *new_cpu, unsigned int new_opcode, unsigned int address)
  {return new MOVLP(new_cpu,new_opcode,address);}

};

//---------------------------------------------------------
class RESET : public instruction
{
public:

  RESET(Processor *new_cpu, unsigned int new_opcode, unsigned int address);
  virtual void execute();
  virtual bool isBase() { return true;}
  static instruction *construct(Processor *new_cpu, unsigned int new_opcode, unsigned int address)
  {return new RESET(new_cpu,new_opcode,address);}

};


//---------------------------------------------------------
class RETFIE : public instruction
{
public:

  RETFIE(Processor *new_cpu, unsigned int new_opcode, unsigned int address);
  virtual void execute(void);
  virtual bool isBase() { return true;}
  static instruction *construct(Processor *new_cpu, unsigned int new_opcode, unsigned int address)
    {return new RETFIE(new_cpu,new_opcode,address);}

};


//---------------------------------------------------------
class RETURN : public instruction
{
public:

  RETURN(Processor *new_cpu, unsigned int new_opcode, unsigned int address);
  virtual void execute(void);
  virtual bool isBase() { return true;}
  static instruction *construct(Processor *new_cpu, unsigned int new_opcode, unsigned int address)
    {return new RETURN(new_cpu,new_opcode,address);}

};

//---------------------------------------------------------

class SUBLW : public Literal_op
{

public:

  SUBLW(Processor *new_cpu, unsigned int new_opcode, unsigned int address);
  virtual void execute(void);
  static instruction *construct(Processor *new_cpu, unsigned int new_opcode, unsigned int address)
    {return new SUBLW(new_cpu,new_opcode,address);}

};

//---------------------------------------------------------
class SUBWFB : public Register_op
{
public:

  SUBWFB(Processor *new_cpu, unsigned int new_opcode, unsigned int address);
  virtual void execute();
  static instruction *construct(Processor *new_cpu, unsigned int new_opcode, unsigned int address)
  {return new SUBWFB(new_cpu,new_opcode,address);}
};



#endif //  __14BIT_INSTRUCTIONS_H__