semihosting.hh (12533:a5b047f55eb6) semihosting.hh (12698:cef1e0e7a368)
1/*
2 * Copyright (c) 2018 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 230 unchanged lines hidden (view full) ---

239 protected:
240 int64_t openImpl(bool unserialize);
241 bool needClose() const { return !isTTY(); }
242
243 FILE *file;
244 };
245
246 std::vector<std::unique_ptr<FileBase>> files;
1/*
2 * Copyright (c) 2018 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 230 unchanged lines hidden (view full) ---

239 protected:
240 int64_t openImpl(bool unserialize);
241 bool needClose() const { return !isTTY(); }
242
243 FILE *file;
244 };
245
246 std::vector<std::unique_ptr<FileBase>> files;
247 FILE *stdin;
248 FILE *stdout;
249 FILE *stderr;
247
248 protected: // Helper functions
249 unsigned calcTickShift() const {
250 int msb = findMsbSet(SimClock::Frequency);
251 return msb > 31 ? msb - 31 : 0;
252 }
253 uint64_t semiTick(Tick tick) const {
254 return tick >> tickShift;

--- 82 unchanged lines hidden (view full) ---

337 SEMI_CALL(ExitExtended);
338
339 SEMI_CALL(Elapsed);
340 SEMI_CALL(TickFreq);
341
342#undef SEMI_CALL
343
344 static const SemiCall *getCall(uint32_t op, bool aarch64);
250
251 protected: // Helper functions
252 unsigned calcTickShift() const {
253 int msb = findMsbSet(SimClock::Frequency);
254 return msb > 31 ? msb - 31 : 0;
255 }
256 uint64_t semiTick(Tick tick) const {
257 return tick >> tickShift;

--- 82 unchanged lines hidden (view full) ---

340 SEMI_CALL(ExitExtended);
341
342 SEMI_CALL(Elapsed);
343 SEMI_CALL(TickFreq);
344
345#undef SEMI_CALL
346
347 static const SemiCall *getCall(uint32_t op, bool aarch64);
348 static FILE *getSTDIO(const char *stream_name,
349 const std::string &name, const char *mode);
345
346 static const std::map<uint32_t, SemiCall> calls;
347 static const std::vector<const char *> fmodes;
348 static const std::map<uint64_t, const char *> exitCodes;
349 static const std::vector<uint8_t> features;
350
351 static const std::map<uint32_t, SemiCall> calls;
352 static const std::vector<const char *> fmodes;
353 static const std::map<uint64_t, const char *> exitCodes;
354 static const std::vector<uint8_t> features;
355 static const std::map<const std::string, FILE *> stdioMap;
350};
351
352#endif // __ARCH_ARM_SEMIHOSTING_HH__
356};
357
358#endif // __ARCH_ARM_SEMIHOSTING_HH__