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; |
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); |
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; |
356}; 357 358#endif // __ARCH_ARM_SEMIHOSTING_HH__ |