|
263 | 263 | ret i64 %jlfp
|
264 | 264 | }
|
265 | 265 |
|
| 266 | + attributes #0 = { alwaysinline nounwind ssp uwtable } |
| 267 | + """, "main"), Ptr{FILE}, Tuple{}) |
| 268 | + end |
| 269 | +elseif Sys.iswindows() |
| 270 | + @inline function stdoutp() |
| 271 | + @assert Int===Int64 |
| 272 | + Base.llvmcall((""" |
| 273 | + declare i8* @__acrt_iob_func(i32 noundef) |
| 274 | +
|
| 275 | + define i64 @main() #0 { |
| 276 | + entry: |
| 277 | + %ptr = call i8* @__acrt_iob_func(i32 noundef 1) |
| 278 | + %jlfp = ptrtoint i8* %ptr to i64 |
| 279 | + ret i64 %jlfp |
| 280 | + } |
| 281 | +
|
266 | 282 | attributes #0 = { alwaysinline nounwind ssp uwtable }
|
267 | 283 | """, "main"), Ptr{FILE}, Tuple{})
|
268 | 284 | end
|
|
316 | 332 | ret i64 %jlfp
|
317 | 333 | }
|
318 | 334 |
|
| 335 | + attributes #0 = { alwaysinline nounwind ssp uwtable } |
| 336 | + """, "main"), Ptr{FILE}, Tuple{}) |
| 337 | + end |
| 338 | +elseif Sys.iswindows() |
| 339 | + @inline function stderrp() |
| 340 | + @assert Int===Int64 |
| 341 | + Base.llvmcall((""" |
| 342 | + declare i8* @__acrt_iob_func(i32 noundef) |
| 343 | +
|
| 344 | + define i64 @main() #0 { |
| 345 | + entry: |
| 346 | + %ptr = call i8* @__acrt_iob_func(i32 noundef 2) |
| 347 | + %jlfp = ptrtoint i8* %ptr to i64 |
| 348 | + ret i64 %jlfp |
| 349 | + } |
| 350 | +
|
319 | 351 | attributes #0 = { alwaysinline nounwind ssp uwtable }
|
320 | 352 | """, "main"), Ptr{FILE}, Tuple{})
|
321 | 353 | end
|
|
365 | 397 | ret i64 %jlfp
|
366 | 398 | }
|
367 | 399 |
|
| 400 | + attributes #0 = { alwaysinline nounwind ssp uwtable } |
| 401 | + """, "main"), Ptr{FILE}, Tuple{}) |
| 402 | + end |
| 403 | +elseif Sys.iswindows() |
| 404 | + @inline function stdinp() |
| 405 | + @assert Int===Int64 |
| 406 | + Base.llvmcall((""" |
| 407 | + declare i8* @__acrt_iob_func(i32 noundef) |
| 408 | +
|
| 409 | + define i64 @main() #0 { |
| 410 | + entry: |
| 411 | + %ptr = call i8* @__acrt_iob_func(i32 noundef 0) |
| 412 | + %jlfp = ptrtoint i8* %ptr to i64 |
| 413 | + ret i64 %jlfp |
| 414 | + } |
| 415 | +
|
368 | 416 | attributes #0 = { alwaysinline nounwind ssp uwtable }
|
369 | 417 | """, "main"), Ptr{FILE}, Tuple{})
|
370 | 418 | end
|
|
0 commit comments